remove unused import & unused package

hmxc
小赖 4 years ago
parent 7f2efa1aa3
commit df9bb9fc1e

@ -4,7 +4,6 @@ import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/developer_util.dart';
import 'package:akuCommunity/utils/hive_store.dart';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:ani_route/ani_route.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
@ -20,7 +19,6 @@ import 'package:flutter_localizations/flutter_localizations.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
ARoute.init(true);
await Hive.initFlutter();
await HiveStore.init();
AmapLocation.instance.init(iosKey: 'ios key');

@ -3,8 +3,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:akuCommunity/utils/headers.dart';
@ -114,8 +112,7 @@ class _LookLogisticsPageState extends State<LookLogisticsPage> {
size: BaseStyle.fontSize28,
),
Container(
margin:
EdgeInsets.only(top: 8.w),
margin: EdgeInsets.only(top: 8.w),
child: Text(
'物流投诉',
style: TextStyle(
@ -158,8 +155,7 @@ class _LookLogisticsPageState extends State<LookLogisticsPage> {
child: Text(
'中通快递 3072035702394120',
style: TextStyle(
fontSize: BaseStyle.fontSize22,
color: ktextPrimary),
fontSize: BaseStyle.fontSize22, color: ktextPrimary),
),
),
SizedBox(
@ -282,26 +278,27 @@ class _LookLogisticsPageState extends State<LookLogisticsPage> {
}
Widget _body() {
return FlutterMap(
options: MapOptions(
center: LatLng(22.3817, 114.05),
zoom: 13,
maxZoom: 15,
),
layers: [
TileLayerOptions(
urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"),
MarkerLayerOptions(markers: [
Marker(
point: LatLng(22.3817, 114.05),
builder: (ctx) => Icon(
Icons.location_on,
color: Colors.blue,
size: 48.0,
),
height: 60),
]),
],
);
return SizedBox();
// return FlutterMap(
// options: MapOptions(
// center: LatLng(22.3817, 114.05),
// zoom: 13,
// maxZoom: 15,
// ),
// layers: [
// TileLayerOptions(
// urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"),
// MarkerLayerOptions(markers: [
// Marker(
// point: LatLng(22.3817, 114.05),
// builder: (ctx) => Icon(
// Icons.location_on,
// color: Colors.blue,
// size: 48.0,
// ),
// height: 60),
// ]),
// ],
// );
}
}

@ -1,235 +0,0 @@
import 'package:akuCommunity/pages/tab_navigator.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:ani_route/ani_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class UserAuthenticationPage extends StatefulWidget {
final BuildContext context;
UserAuthenticationPage({Key key, this.context}) : super(key: key);
@override
_UserAuthenticationPageState createState() => _UserAuthenticationPageState();
}
class _UserAuthenticationPageState extends State<UserAuthenticationPage> {
TextEditingController _userNickName = new TextEditingController();
TextEditingController _userName = new TextEditingController();
TextEditingController _userIDCard = new TextEditingController();
List<Map<String, dynamic>> _listRadio = [
{'title': '租客', 'isCheck': false},
{'title': '业主', 'isCheck': false},
{'title': '亲属', 'isCheck': false}
];
AppBar _appBar() {
final userProvider=Provider.of<UserProvider>(context);
return AppBar(
elevation: 0,
backgroundColor: Colors.white,
leading: IconButton(
icon: Icon(AntDesign.left, size: 40.sp),
onPressed: () {
Get.back();
},
),
actions: [
MaterialButton(
child: Text('跳过'),
onPressed: () {
userProvider.setisSigned(true);
ARoute.pop(context,root: true);
ARoute.pushReplace(context, TabNavigator());
},
),
],
);
}
Text _textTag(String tag) {
return Text(
tag,
style: TextStyle(
fontSize: BaseStyle.fontSize28, color: BaseStyle.color999999),
);
}
Column _columnRadio() {
return Column(
children: _listRadio
.map((item) => Container(
padding: EdgeInsets.only(
bottom: 16.w,
top: 40.w,
),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: BaseStyle.colord8d8d8, width: 0.5),
),
),
child: InkWell(
onTap: () {
setState(() {
_listRadio.forEach((item) {
item['isCheck'] = false;
});
item['isCheck'] = true;
});
},
child: Row(
children: [
item['isCheck']
? Icon(Icons.radio_button_checked,
color: BaseStyle.colorffc40c)
: Icon(
Icons.radio_button_unchecked,
color: BaseStyle.color999999,
),
SizedBox(width: 17.w),
Text(
item['title'],
style: TextStyle(
fontWeight: item['isCheck']
? FontWeight.w600
: FontWeight.normal,
fontSize: BaseStyle.fontSize28,
color: item['isCheck']
? ktextPrimary
: BaseStyle.color999999),
),
],
),
),
))
.toList(),
);
}
Container _containerTextField(
TextEditingController controller, String hintText) {
return Container(
child: TextFormField(
cursorColor: Color(0xffffc40c),
style: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize34,
),
controller: controller,
onChanged: (String value) {},
maxLines: 1,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(
top: 0.w,
bottom: 0.w,
),
hintText: hintText,
border: InputBorder.none, //线
fillColor: Colors.white,
filled: true,
hintStyle: TextStyle(
color: BaseStyle.color999999,
fontSize: BaseStyle.fontSize34,
),
),
),
);
}
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> _listWidget = [
{
'title': '请输入您的昵称',
'widget': _containerTextField(_userNickName, '为保护个人隐私,在与邻居交流时将显示昵称')
},
{'title': '请输入您的姓名', 'widget': _containerTextField(_userName, '请输入您的姓名')},
{
'title': '请输入您的身份证',
'widget': _containerTextField(_userIDCard, '请输入您的身份证号')
},
];
List<Widget> _listView() {
return _listWidget
.map((item) => Container(
padding: EdgeInsets.only(
top: 23.w,
bottom: 24.w,
),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(color: BaseStyle.coloreeeeee, width: 0.5)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
item['title'],
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextPrimary),
),
SizedBox(height: 25.w),
item['widget'],
],
),
))
.toList();
}
return Scaffold(
appBar: _appBar(),
body: SingleChildScrollView(
child: Container(
color: Colors.white,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Container(
padding: EdgeInsets.only(
left: 32.w,
right: 32.w,
top: 32.w,
),
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'欢迎登录小蜜蜂',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize38,
color: ktextPrimary),
),
SizedBox(height: 8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_textTag('身份选择'),
SizedBox(height: 167.w),
_columnRadio(),
Column(
children: _listView(),
),
],
),
],
),
),
),
),
),
);
}
}

@ -46,6 +46,7 @@ class UserProvider extends ChangeNotifier {
UserInfoModel _userInfoModel;
UserInfoModel get userInfoModel => _userInfoModel;
///
Future setSex(int sex) async {
BaseModel baseModel = await NetUtil().post(
API.user.setSex,
@ -58,6 +59,7 @@ class UserProvider extends ChangeNotifier {
}
}
///
Future setBirthday(DateTime date) async {
BaseModel baseModel = await NetUtil().post(
API.user.setBirthday,
@ -69,4 +71,9 @@ class UserProvider extends ChangeNotifier {
notifyListeners();
}
}
//
Future setName(String name) async {
//TODO set name
}
}

@ -43,20 +43,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.39.17"
ani_route:
dependency: "direct main"
description:
name: ani_route
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.2"
animate_do:
dependency: "direct main"
description:
name: animate_do
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.3"
animator:
dependency: transitive
description:
@ -309,20 +295,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.2.1"
flare_dart:
dependency: transitive
description:
name: flare_dart
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.4"
flare_flutter:
dependency: "direct main"
description:
name: flare_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.6"
flui:
dependency: "direct main"
description:
@ -398,25 +370,11 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
flutter_image:
dependency: transitive
description:
name: flutter_image
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_map:
dependency: "direct main"
description:
name: flutter_map
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.10.1+1"
flutter_page_indicator:
dependency: transitive
description:
@ -602,13 +560,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.1"
lists:
dependency: transitive
description:
name: lists
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.6"
logger:
dependency: "direct main"
description:
@ -637,13 +588,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
mgrs_dart:
dependency: transitive
description:
name: mgrs_dart
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
multi_image_picker:
dependency: "direct main"
description:
@ -812,13 +756,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
positioned_tap_detector:
dependency: transitive
description:
name: positioned_tap_detector
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
process:
dependency: transitive
description:
@ -826,13 +763,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.13"
proj4dart:
dependency: transitive
description:
name: proj4dart
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
provider:
dependency: "direct main"
description:
@ -875,13 +805,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
rational:
dependency: transitive
description:
@ -958,7 +881,7 @@ packages:
name: shimmer
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.1"
version: "1.1.2"
sky_engine:
dependency: transitive
description: flutter
@ -1062,20 +985,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.6"
transparent_image:
dependency: transitive
description:
name: transparent_image
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
tuple:
dependency: transitive
description:
name: tuple
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
typed_data:
dependency: transitive
description:
@ -1083,13 +992,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
unicode:
dependency: transitive
description:
name: unicode
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.4"
url_launcher:
dependency: "direct main"
description:
@ -1209,13 +1111,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.3"
wkt_parser:
dependency: transitive
description:
name: wkt_parser
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.7"
xdg_directories:
dependency: transitive
description:

@ -64,18 +64,12 @@ dependencies:
sliding_up_panel: ^1.0.2
#经纬度
latlong: ^0.6.1
#谷歌地图
flutter_map: ^0.10.1+1
#滑块
flutter_slidable: ^0.5.7
#动画效果
flare_flutter: ^2.0.6
#http
dio: ^3.0.10
#骨架
shimmer: ^1.1.1
#动画库
animate_do: ^1.7.3
#动画alert
rflutter_alert: ^1.1.0
@ -92,7 +86,6 @@ dependencies:
#用户存储路径
path_provider: ^1.6.18
ani_route: ^0.0.2
fluwx: ^2.3.0
get:
@ -106,20 +99,12 @@ dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# 路由管理
ff_annotation_route: 3.3.2
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/
- assets/icons/
@ -127,26 +112,3 @@ flutter:
- assets/example/
- assets/tab/
- assets/json/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

Loading…
Cancel
Save