resolved lint errors

dev_faiz
FaizHashmiCS22 3 years ago
parent d20a45208a
commit 3295bbc9e1

@ -1,25 +1,16 @@
import 'dart:async';
import 'dart:io';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:queuing_system/core/api.dart'; import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/core/base/app_scaffold_widget.dart'; import 'package:queuing_system/core/base/app_scaffold_widget.dart';
import 'package:queuing_system/core/base/base_app_client.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_model/patient_call.dart'; import 'package:queuing_system/core/response_model/patient_call.dart';
import 'package:queuing_system/header/app_header.dart'; import 'package:queuing_system/header/app_header.dart';
import 'package:queuing_system/home/home_screen_components.dart'; import 'package:queuing_system/home/home_screen_components.dart';
import 'package:queuing_system/home/que_item_list.dart';
import 'package:queuing_system/utils/call_by_voice.dart'; import 'package:queuing_system/utils/call_by_voice.dart';
import 'package:queuing_system/utils/call_type.dart'; import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart'; import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
import 'package:signalr_core/signalr_core.dart';
import 'package:text_to_speech/text_to_speech.dart';
import 'first_column.dart';
var DEVICE_IP = "10.20.20.19"; // Testing IP var DEVICE_IP = "10.20.20.19"; // Testing IP
// var DEVICE_IP = "10.70.249.21"; // (Make sure by Haroon before use it) Production IP // var DEVICE_IP = "10.70.249.21"; // (Make sure by Haroon before use it) Production IP
@ -34,8 +25,6 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> { class _MyHomePageState extends State<MyHomePage> {
SignalRHelper signalRHelper = SignalRHelper(); SignalRHelper signalRHelper = SignalRHelper();
final _tts = TextToSpeech();
List<Tickets> waitings = []; List<Tickets> waitings = [];
List<Tickets> currents = []; List<Tickets> currents = [];
@ -59,15 +48,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} }
_tts.setLanguage("en");
_tts.setRate(0.7);
// _tts.getVoiceByLang('en').then((value){
//
// })
_tts.getVoice().then((value){
_tts.setVoice(value[2]);
});
super.initState(); super.initState();
} }
@ -189,6 +170,8 @@ class _MyHomePageState extends State<MyHomePage> {
case ConnectivityResult.none: case ConnectivityResult.none:
signalRHelper.closeConnection(context); signalRHelper.closeConnection(context);
break; break;
case ConnectivityResult.mobile:
break;
} }
}); });
} }

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
@ -31,8 +30,8 @@ class AppText extends StatefulWidget {
final TextDecoration textDecoration; final TextDecoration textDecoration;
final bool isCopyable; final bool isCopyable;
AppText( const AppText(
this.text, { this.text, {Key key,
this.color = Colors.black, this.color = Colors.black,
this.fontWeight, this.fontWeight,
this.variant, this.variant,
@ -59,7 +58,7 @@ class AppText extends StatefulWidget {
this.textDecoration, this.textDecoration,
this.letterSpacing, this.letterSpacing,
this.isCopyable = false, this.isCopyable = false,
}); }) : super(key: key);
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -72,9 +71,9 @@ class _AppTextState extends State<AppText> {
@override @override
void didUpdateWidget(covariant AppText oldWidget) { void didUpdateWidget(covariant AppText oldWidget) {
setState(() { setState(() {
if (widget.style == "overline") if (widget.style == "overline") {
text = widget.text.toUpperCase(); text = widget.text.toUpperCase();
else { } else {
text = widget.text; text = widget.text;
} }
}); });
@ -84,9 +83,9 @@ class _AppTextState extends State<AppText> {
@override @override
void initState() { void initState() {
hidden = widget.readMore; hidden = widget.readMore;
if (widget.style == "overline") if (widget.style == "overline") {
text = widget.text.toUpperCase(); text = widget.text.toUpperCase();
else { } else {
text = widget.text; text = widget.text;
} }
super.initState(); super.initState();
@ -133,7 +132,7 @@ class _AppTextState extends State<AppText> {
widget.readMore && widget.readMore &&
text.length > widget.maxLength) text.length > widget.maxLength)
Padding( Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), padding: const EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
@ -158,42 +157,40 @@ class _AppTextState extends State<AppText> {
if (widget.isCopyable) { if (widget.isCopyable) {
return Theme( return Theme(
data: ThemeData( data: ThemeData(
textSelectionColor: Colors.lightBlueAccent, textSelectionTheme: const TextSelectionThemeData(selectionColor: Colors.lightBlueAccent),
), ),
child: Container( child: SelectableText(
child: SelectableText( !hidden
!hidden ? text
? text : (text.substring(
: (text.substring( 0,
0, text.length > widget.maxLength
text.length > widget.maxLength ? widget.maxLength
? widget.maxLength : text.length)),
: text.length)), textAlign: widget.textAlign,
textAlign: widget.textAlign, // overflow: widget.maxLines != null
// overflow: widget.maxLines != null // ? ((widget.maxLines > 1)
// ? ((widget.maxLines > 1) // ? TextOverflow.fade
// ? TextOverflow.fade // : TextOverflow.ellipsis)
// : TextOverflow.ellipsis) // : null,
// : null, maxLines: widget.maxLines,
maxLines: widget.maxLines ?? null, style: widget.style != null
style: widget.style != null ? _getFontStyle().copyWith(
? _getFontStyle().copyWith( fontStyle: widget.italic ? FontStyle.italic : null,
fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color,
color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(),
fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight)
height: widget.fontHeight) : TextStyle(
: TextStyle( fontStyle: widget.italic ? FontStyle.italic : null,
fontStyle: widget.italic ? FontStyle.italic : null, color:
color: widget.color ?? const Color(0xff000000),
widget.color != null ? widget.color : Color(0xff000000), fontSize: widget.fontSize ?? _getFontSize(),
fontSize: widget.fontSize ?? _getFontSize(), letterSpacing: widget.letterSpacing ??
letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
(widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins',
fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration,
decoration: widget.textDecoration, height: widget.fontHeight),
height: widget.fontHeight),
),
), ),
); );
} else { } else {
@ -211,7 +208,7 @@ class _AppTextState extends State<AppText> {
? TextOverflow.fade ? TextOverflow.fade
: TextOverflow.ellipsis) : TextOverflow.ellipsis)
: null, : null,
maxLines: widget.maxLines ?? null, maxLines: widget.maxLines,
style: widget.style != null style: widget.style != null
? _getFontStyle().copyWith( ? _getFontStyle().copyWith(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
@ -220,7 +217,7 @@ class _AppTextState extends State<AppText> {
height: widget.fontHeight) height: widget.fontHeight)
: TextStyle( : TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color != null ? widget.color : Colors.black, color: widget.color ?? Colors.black,
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ?? letterSpacing: widget.letterSpacing ??
(widget.variant == "overline" ? 1.5 : null), (widget.variant == "overline" ? 1.5 : null),
@ -257,7 +254,7 @@ class _AppTextState extends State<AppText> {
case "button": case "button":
return Theme.of(context).textTheme.button; return Theme.of(context).textTheme.button;
default: default:
return TextStyle(); return const TextStyle();
} }
} }

@ -9,12 +9,10 @@ import audio_session
import connectivity_macos import connectivity_macos
import just_audio import just_audio
import path_provider_macos import path_provider_macos
import text_to_speech_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
TextToSpeechMacOsPlugin.register(with: registry.registrar(forPlugin: "TextToSpeechMacOsPlugin"))
} }

@ -7,7 +7,21 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.9.0"
audio_session:
dependency: transitive
description:
name: audio_session
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.10"
blinking_text:
dependency: "direct main"
description:
name: blinking_text
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -21,7 +35,7 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
@ -35,14 +49,14 @@ packages:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0" version: "1.16.0"
connectivity: connectivity:
dependency: "direct main" dependency: "direct main"
description: description:
@ -91,7 +105,21 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -155,7 +183,28 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3" version: "0.6.4"
just_audio:
dependency: "direct main"
description:
name: just_audio
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.30"
just_audio_platform_interface:
dependency: transitive
description:
name: just_audio_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
just_audio_web:
dependency: transitive
description:
name: just_audio_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.7"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -176,14 +225,21 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.8.0"
nested: nested:
dependency: transitive dependency: transitive
description: description:
@ -197,7 +253,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.2"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -212,6 +268,55 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.0"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.20"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
@ -219,6 +324,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.4.0" version: "4.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -226,6 +338,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -240,6 +359,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1+1" version: "3.0.1+1"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.5"
signalr_core: signalr_core:
dependency: "direct main" dependency: "direct main"
description: description:
@ -258,7 +384,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.9.0"
sse_client: sse_client:
dependency: transitive dependency: transitive
description: description:
@ -286,21 +412,21 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.4.12"
tuple: tuple:
dependency: transitive dependency: transitive
description: description:
@ -315,13 +441,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.6"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
web_socket_channel: web_socket_channel:
dependency: transitive dependency: transitive
description: description:
@ -329,6 +462,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
xml: xml:
dependency: transitive dependency: transitive
description: description:
@ -337,5 +484,5 @@ packages:
source: hosted source: hosted
version: "5.3.1" version: "5.3.1"
sdks: sdks:
dart: ">=2.14.0 <3.0.0" dart: ">=2.17.0 <3.0.0"
flutter: ">=2.4.0-0.0.pre" flutter: ">=3.0.0"

@ -40,7 +40,6 @@ dependencies:
http: ^0.13.0 http: ^0.13.0
blinking_text: ^1.0.2 blinking_text: ^1.0.2
text_to_speech: ^0.2.3
just_audio: ^0.9.29 just_audio: ^0.9.29
#signalr core #signalr core

@ -5,6 +5,9 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

Loading…
Cancel
Save