diff --git a/lib/main.dart b/lib/main.dart index 46763728..774eb5ea 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -52,7 +52,7 @@ class _MyAppState extends State { } }, child: MediaQuery( - data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window), + data: MediaQueryData.fromWindow(WidgetsBinding.instance.window), child: ScreenUtilInit( designSize: Size(750, 1334), // minTextAdapt: true, diff --git a/lib/models/facility/facility_type_detail_model.dart b/lib/models/facility/facility_type_detail_model.dart index f76614c5..3717c258 100644 --- a/lib/models/facility/facility_type_detail_model.dart +++ b/lib/models/facility/facility_type_detail_model.dart @@ -1,4 +1,3 @@ -import 'package:common_utils/common_utils.dart'; import 'package:equatable/equatable.dart'; import 'package:intl/intl.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/ui/community/facility/facility_preorder_date_picker.dart b/lib/ui/community/facility/facility_preorder_date_picker.dart index 02f9478a..8eae8088 100644 --- a/lib/ui/community/facility/facility_preorder_date_picker.dart +++ b/lib/ui/community/facility/facility_preorder_date_picker.dart @@ -1,15 +1,11 @@ -import 'package:flutter/cupertino.dart'; import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/models/facility/facility_type_detail_model.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/widget/picker/bee_choose_date_picker.dart'; import 'package:common_utils/common_utils.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:get/get_core/src/get_main.dart'; -import 'package:intl/intl.dart'; import '../../../utils/network/base_model.dart'; import '../../../utils/network/net_util.dart'; import '../../../widget/buttons/bee_check_radio.dart'; diff --git a/lib/ui/community/facility/facility_preorder_page.dart b/lib/ui/community/facility/facility_preorder_page.dart index 3cf139ca..d4e58609 100644 --- a/lib/ui/community/facility/facility_preorder_page.dart +++ b/lib/ui/community/facility/facility_preorder_page.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:common_utils/common_utils.dart'; import 'package:get/get.dart'; -import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:aku_new_community/base/base_style.dart'; @@ -15,19 +14,14 @@ import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/ui/community/facility/facility_preorder_date_picker.dart'; import 'package:aku_new_community/ui/community/facility/facility_type_detail_page.dart'; import 'package:aku_new_community/ui/community/facility/facility_order_date_list_page.dart'; -import 'package:aku_new_community/ui/community/facility/facility_type_detail_page.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; -import 'package:aku_new_community/widget/buttons/bottom_button.dart'; -import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import '../../../constants/saas_api.dart'; import '../../../models/facility/facility_type_model.dart'; import '../../../widget/bee_avatar_widget.dart'; -import '../../../widget/bee_image_network.dart'; import '../../../widget/others/user_tool.dart'; -import '../../../widget/picker/bee_choose_date_picker.dart'; import '../../../widget/picker/bee_day_picker.dart'; import '../../manager/advice/advice_house_page.dart'; diff --git a/lib/ui/community/facility/facility_type_card.dart b/lib/ui/community/facility/facility_type_card.dart index ceb6abe2..4b9bd154 100644 --- a/lib/ui/community/facility/facility_type_card.dart +++ b/lib/ui/community/facility/facility_type_card.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:aku_new_community/base/base_style.dart'; -import 'package:aku_new_community/constants/saas_api.dart'; -import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/models/facility/facility_type_model.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'facility_type_detail_page.dart'; diff --git a/lib/ui/community/facility/facility_type_detail_card.dart b/lib/ui/community/facility/facility_type_detail_card.dart index 4f08a73f..6482a39a 100644 --- a/lib/ui/community/facility/facility_type_detail_card.dart +++ b/lib/ui/community/facility/facility_type_detail_card.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:aku_new_community/base/base_style.dart'; -import 'package:aku_new_community/constants/saas_api.dart'; -import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/utils/headers.dart'; import '../../../models/facility/facility_type_detail_model.dart'; import '../../../models/facility/facility_type_model.dart'; diff --git a/lib/ui/function_and_service/work_order/history_report_page.dart b/lib/ui/function_and_service/work_order/history_report_page.dart index 157549c7..382e8433 100644 --- a/lib/ui/function_and_service/work_order/history_report_page.dart +++ b/lib/ui/function_and_service/work_order/history_report_page.dart @@ -106,7 +106,7 @@ class _LineCardState extends State { @override void didChangeDependencies() { - WidgetsBinding.instance!.addPostFrameCallback((timeStamp) { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { _height = context.size?.height ?? 0; print(context.size?.height); setState(() {}); diff --git a/pubspec.lock b/pubspec.lock index 2a354060..84ec4bc7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -486,6 +486,13 @@ packages: url: "https://git.oa00.com/flutter_third/flutter-icons.git" source: git version: "1.1.1-nullsafety.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" flutter_localizations: dependency: "direct main" description: flutter @@ -760,6 +767,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.4" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" logger: dependency: transitive description: @@ -1407,5 +1421,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.17.0-206.0.dev <3.0.0" flutter: ">=2.8.0" diff --git a/pubspec.yaml b/pubspec.yaml index ad826962..5ceecbb8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -143,6 +143,7 @@ dev_dependencies: yaml: ^3.1.0 pub_semver: ^2.0.0 flutter_gen_runner: ^4.1.3 + flutter_lints: ^2.0.0 flutter: uses-material-design: true