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:flutter/material.dart';
import 'package:queuing_system/core/api.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/response_model/patient_call.dart';
import 'package:queuing_system/header/app_header.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_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:queuing_system/utils/utils.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.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> {
SignalRHelper signalRHelper = SignalRHelper();
final _tts = TextToSpeech();
List<Tickets> waitings = [];
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();
}
@ -189,6 +170,8 @@ class _MyHomePageState extends State<MyHomePage> {
case ConnectivityResult.none:
signalRHelper.closeConnection(context);
break;
case ConnectivityResult.mobile:
break;
}
});
}

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

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

@ -7,7 +7,21 @@ packages:
name: async
url: "https://pub.dartlang.org"
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:
dependency: transitive
description:
@ -21,7 +35,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
charcode:
dependency: transitive
description:
@ -35,14 +49,14 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
connectivity:
dependency: "direct main"
description:
@ -91,7 +105,21 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
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:
dependency: "direct main"
description: flutter
@ -155,7 +183,28 @@ packages:
name: js
url: "https://pub.dartlang.org"
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:
dependency: transitive
description:
@ -176,14 +225,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
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:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
nested:
dependency: transitive
description:
@ -197,7 +253,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.2"
path_drawing:
dependency: transitive
description:
@ -212,6 +268,55 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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:
dependency: transitive
description:
@ -219,6 +324,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
@ -226,6 +338,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider:
dependency: "direct main"
description:
@ -240,6 +359,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1+1"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.5"
signalr_core:
dependency: "direct main"
description:
@ -258,7 +384,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.9.0"
sse_client:
dependency: transitive
description:
@ -286,21 +412,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.12"
tuple:
dependency: transitive
description:
@ -315,13 +441,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
web_socket_channel:
dependency: transitive
description:
@ -329,6 +462,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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:
dependency: transitive
description:
@ -337,5 +484,5 @@ packages:
source: hosted
version: "5.3.1"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.4.0-0.0.pre"
dart: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

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

@ -5,6 +5,9 @@
list(APPEND FLUTTER_PLUGIN_LIST
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
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 ${${plugin}_bundled_libraries})
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