kotlin ver 1.4.10

update ui
hmxc
小赖 4 years ago
parent c0dd01cf01
commit dd103d1ecf

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.11' ext.kotlin_version = '1.4.10'
repositories { repositories {
// google() // google()
// jcenter() // jcenter()

@ -1,8 +1,5 @@
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:barcode_scan/barcode_scan.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/widget/bottom_button.dart'; import 'package:akuCommunity/widget/bottom_button.dart';
import 'package:akuCommunity/widget/cached_image_wrapper.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart';
@ -137,77 +134,11 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
bottom: 0, bottom: 0,
child: BottomButton( child: BottomButton(
title: '扫一扫出借', title: '扫一扫出借',
fun: () { fun: () {},
scan();
},
), ),
), ),
], ],
), ),
); );
} }
ScanResult scanResult;
final _flashOnController = TextEditingController(text: "打开闪光灯");
final _flashOffController = TextEditingController(text: "关闭闪光灯");
final _cancelController = TextEditingController(text: "关闭");
var _aspectTolerance = 0.00;
var numberOfCameras = 0;
var _selectedCamera = -1;
var _useAutoFocus = true;
var _autoEnableFlash = false;
static final _possibleFormats = BarcodeFormat.values.toList()
..removeWhere((e) => e == BarcodeFormat.unknown);
List<BarcodeFormat> selectedFormats = [..._possibleFormats];
void initState() {
super.initState();
Future.delayed(Duration.zero, () async {
numberOfCameras = await BarcodeScanner.numberOfCameras;
setState(() {});
});
}
Future scan() async {
try {
var options = ScanOptions(
strings: {
"cancel": _cancelController.text,
"flash_on": _flashOnController.text,
"flash_off": _flashOffController.text,
},
restrictFormat: selectedFormats,
useCamera: _selectedCamera,
autoEnableFlash: _autoEnableFlash,
android: AndroidOptions(
aspectTolerance: _aspectTolerance,
useAutoFocus: _useAutoFocus,
),
);
var result = await BarcodeScanner.scan(options: options);
setState(() => scanResult = result);
} on PlatformException catch (e) {
var result = ScanResult(
type: ResultType.Error,
format: BarcodeFormat.unknown,
);
if (e.code == BarcodeScanner.cameraAccessDenied) {
setState(() {
result.rawContent = 'The user did not grant the camera permission!';
});
} else {
result.rawContent = 'Unknown error: $e';
}
setState(() {
scanResult = result;
});
}
}
} }

@ -1,12 +1,18 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/message_center_page/message_center_page.dart';
import 'package:akuCommunity/pages/scan/scan_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
import 'widget/home_app_bar.dart';
import 'widget/home_search.dart'; import 'widget/home_search.dart';
import 'widget/home_swiper.dart'; import 'widget/home_swiper.dart';
import 'widget/home_card.dart'; import 'widget/home_card.dart';
@ -18,6 +24,8 @@ import 'package:akuCommunity/service/base_model.dart';
import 'package:akuCommunity/model/aku_shop_model.dart'; import 'package:akuCommunity/model/aku_shop_model.dart';
import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/routers/page_routers.dart';
import 'package:velocity_x/velocity_x.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
HomePage({Key key}) : super(key: key); HomePage({Key key}) : super(key: key);
@ -71,16 +79,67 @@ class _HomePageState extends State<HomePage>
_refreshController.loadComplete(); _refreshController.loadComplete();
} }
_buildColButton({IconData icon, String title, VoidCallback onTap}) {
return MaterialButton(
onPressed: onTap,
minWidth: 0,
padding: EdgeInsets.symmetric(horizontal: 16.w),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, size: 48.w, color: Colors.black),
4.hb,
title.text.size(20.sp).black.make(),
],
),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
ScreenUtil.init(context, ScreenUtil.init(context,
designSize: Size(750, 1334), allowFontScaling: true); designSize: Size(750, 1334), allowFontScaling: true);
return Scaffold( return BeeScaffold(
appBar: PreferredSize( title: 'TEST',
child: HomeAppBar(), bgColor: BaseStyle.colorffd000,
preferredSize: Size.fromHeight(kToolbarHeight), leading: Container(
margin: EdgeInsets.only(left: 32.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'深圳',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333),
),
),
Text(
'阴 27℃',
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff333333),
), ),
)
]),
),
actions: [
_buildColButton(
icon: AntDesign.scan1,
title: '扫一扫',
onTap: () => Get.to(ScanPage()),
),
_buildColButton(
icon: AntDesign.bells,
title: '消息',
onTap: () => Get.to(MessageCenterPage()),
),
16.wb,
],
body: RefreshConfiguration( body: RefreshConfiguration(
child: SmartRefresher( child: SmartRefresher(
controller: _refreshController, controller: _refreshController,

@ -1,3 +1,4 @@
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -18,7 +19,6 @@ class _MineCarPageState extends State<MineCarPage> {
{'title': '深圳华茂悦峰', 'subtitle': '1幢-1单元-702室'}, {'title': '深圳华茂悦峰', 'subtitle': '1幢-1单元-702室'},
]; ];
Widget _containerHouseCard(String title, subtitle) { Widget _containerHouseCard(String title, subtitle) {
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -153,13 +153,8 @@ class _MineCarPageState extends State<MineCarPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return BeeScaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '我的${widget.bundle.getMap('carType')['type']}', title: '我的${widget.bundle.getMap('carType')['type']}',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Container( body: Container(
color: Colors.white, color: Colors.white,
child: Stack( child: Stack(

@ -1,3 +1,4 @@
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -142,13 +143,8 @@ class _MineHousePageState extends State<MineHousePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return BeeScaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '我的房屋', title: '我的房屋',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Container( body: Container(
color: Colors.white, color: Colors.white,
child: ListView( child: ListView(

@ -1,3 +1,4 @@
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -67,13 +68,8 @@ class _OpenDoorPageState extends State<OpenDoorPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return BeeScaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '一键开门', title: '一键开门',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Container( body: Container(
color: Colors.white, color: Colors.white,
alignment: Alignment.center, alignment: Alignment.center,

@ -1,3 +1,4 @@
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -117,19 +118,8 @@ class _PropertyIndexState extends State<PropertyIndex>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return Scaffold( return BeeScaffold(
appBar: AppBar( title: '物业',
centerTitle: true,
title: Text(
'物业',
style: TextStyle(
fontSize: 36.sp,
color: Color(0xff333333),
),
),
backgroundColor: Colors.white,
elevation: 0,
),
body: SmartRefresher( body: SmartRefresher(
controller: _refreshController, controller: _refreshController,
header: WaterDropHeader(), header: WaterDropHeader(),

@ -1,9 +1,7 @@
import 'dart:async'; import 'dart:io';
import 'dart:io' show Platform;
import 'package:barcode_scan/barcode_scan.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart';
import 'package:flutter/services.dart';
class ScanPage extends StatefulWidget { class ScanPage extends StatefulWidget {
ScanPage({Key key}) : super(key: key); ScanPage({Key key}) : super(key: key);
@ -13,263 +11,27 @@ class ScanPage extends StatefulWidget {
} }
class _ScanPageState extends State<ScanPage> { class _ScanPageState extends State<ScanPage> {
ScanResult scanResult; final GlobalKey _qrKey = GlobalKey(debugLabel: 'QR');
QRViewController _controller;
final _flashOnController = TextEditingController(text: "Flash on");
final _flashOffController = TextEditingController(text: "Flash off");
final _cancelController = TextEditingController(text: "Cancel");
var _aspectTolerance = 0.00;
var _numberOfCameras = 0;
var _selectedCamera = -1;
var _useAutoFocus = true;
var _autoEnableFlash = false;
static final _possibleFormats = BarcodeFormat.values.toList()
..removeWhere((e) => e == BarcodeFormat.unknown);
List<BarcodeFormat> selectedFormats = [..._possibleFormats];
@override @override
// ignore: type_annotate_public_apis void reassemble() {
initState() { super.reassemble();
super.initState(); if (Platform.isAndroid) {
_controller.pauseCamera();
Future.delayed(Duration.zero, () async { } else if (Platform.isIOS) {
_numberOfCameras = await BarcodeScanner.numberOfCameras; _controller.resumeCamera();
setState(() {}); }
});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var contentList = <Widget>[
if (scanResult != null)
Card(
child: Column(
children: <Widget>[
ListTile(
title: Text("Result Type"),
subtitle: Text(scanResult.type?.toString() ?? ""),
),
ListTile(
title: Text("Raw Content"),
subtitle: Text(scanResult.rawContent ?? ""),
),
ListTile(
title: Text("Format"),
subtitle: Text(scanResult.format?.toString() ?? ""),
),
ListTile(
title: Text("Format note"),
subtitle: Text(scanResult.formatNote ?? ""),
),
],
),
),
ListTile(
title: Text("Camera selection"),
dense: true,
enabled: false,
),
RadioListTile(
onChanged: (v) => setState(() => _selectedCamera = -1),
value: -1,
title: Text("Default camera"),
groupValue: _selectedCamera,
),
];
for (var i = 0; i < _numberOfCameras; i++) {
contentList.add(RadioListTile(
onChanged: (v) => setState(() => _selectedCamera = i),
value: i,
title: Text("Camera ${i + 1}"),
groupValue: _selectedCamera,
));
}
contentList.addAll([
ListTile(
title: Text("Button Texts"),
dense: true,
enabled: false,
),
ListTile(
title: TextField(
decoration: InputDecoration(
labelText: "Flash On",
),
controller: _flashOnController,
),
),
ListTile(
title: TextField(
decoration: InputDecoration(
labelText: "Flash Off",
),
controller: _flashOffController,
),
),
ListTile(
title: TextField(
decoration: InputDecoration(
labelText: "Cancel",
),
controller: _cancelController,
),
),
]);
if (Platform.isAndroid) {
contentList.addAll([
ListTile(
title: Text("Android specific options"),
dense: true,
enabled: false,
),
ListTile(
title:
Text("Aspect tolerance (${_aspectTolerance.toStringAsFixed(2)})"),
subtitle: Slider(
min: -1.0,
max: 1.0,
value: _aspectTolerance,
onChanged: (value) {
setState(() {
_aspectTolerance = value;
});
},
),
),
CheckboxListTile(
title: Text("Use autofocus"),
value: _useAutoFocus,
onChanged: (checked) {
setState(() {
_useAutoFocus = checked;
});
},
)
]);
}
contentList.addAll([
ListTile(
title: Text("Other options"),
dense: true,
enabled: false,
),
CheckboxListTile(
title: Text("Start with flash"),
value: _autoEnableFlash,
onChanged: (checked) {
setState(() {
_autoEnableFlash = checked;
});
},
)
]);
contentList.addAll([
ListTile(
title: Text("Barcode formats"),
dense: true,
enabled: false,
),
ListTile(
trailing: Checkbox(
tristate: true,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
value: selectedFormats.length == _possibleFormats.length
? true
: selectedFormats.length == 0
? false
: null,
onChanged: (checked) {
setState(() {
selectedFormats = [
if (checked ?? false) ..._possibleFormats,
];
});
},
),
dense: true,
enabled: false,
title: Text("Detect barcode formats"),
subtitle: Text(
'If all are unselected, all possible platform formats will be used',
),
),
]);
contentList.addAll(_possibleFormats.map(
(format) => CheckboxListTile(
value: selectedFormats.contains(format),
onChanged: (i) {
setState(() => selectedFormats.contains(format)
? selectedFormats.remove(format)
: selectedFormats.add(format));
},
title: Text(format.toString()),
),
));
return Scaffold( return Scaffold(
appBar: AppBar( body: QRView(
title: Text('Barcode Scanner Example'), key: _qrKey,
actions: <Widget>[ onQRViewCreated: (controller) {
IconButton( _controller = controller;
icon: Icon(Icons.camera),
tooltip: "Scan",
onPressed: scan,
)
],
),
body: ListView(
scrollDirection: Axis.vertical,
shrinkWrap: true,
children: contentList,
),
);
}
Future scan() async {
try {
var options = ScanOptions(
strings: {
"cancel": _cancelController.text,
"flash_on": _flashOnController.text,
"flash_off": _flashOffController.text,
}, },
restrictFormat: selectedFormats,
useCamera: _selectedCamera,
autoEnableFlash: _autoEnableFlash,
android: AndroidOptions(
aspectTolerance: _aspectTolerance,
useAutoFocus: _useAutoFocus,
), ),
); );
var result = await BarcodeScanner.scan(options: options);
setState(() => scanResult = result);
} on PlatformException catch (e) {
var result = ScanResult(
type: ResultType.Error,
format: BarcodeFormat.unknown,
);
if (e.code == BarcodeScanner.cameraAccessDenied) {
setState(() {
result.rawContent = 'The user did not grant the camera permission!';
});
} else {
result.rawContent = 'Unknown error: $e';
}
setState(() {
scanResult = result;
});
}
} }
} }

@ -1,8 +1,5 @@
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:barcode_scan/barcode_scan.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/routers/page_routers.dart';
@ -16,71 +13,6 @@ class AppBarAction extends StatefulWidget {
} }
class _AppBarActionState extends State<AppBarAction> { class _AppBarActionState extends State<AppBarAction> {
ScanResult scanResult;
final _flashOnController = TextEditingController(text: "打开闪光灯");
final _flashOffController = TextEditingController(text: "关闭闪光灯");
final _cancelController = TextEditingController(text: "关闭");
var _aspectTolerance = 0.00;
var numberOfCameras = 0;
var _selectedCamera = -1;
var _useAutoFocus = true;
var _autoEnableFlash = false;
static final _possibleFormats = BarcodeFormat.values.toList()
..removeWhere((e) => e == BarcodeFormat.unknown);
List<BarcodeFormat> selectedFormats = [..._possibleFormats];
void initState() {
super.initState();
Future.delayed(Duration.zero, () async {
numberOfCameras = await BarcodeScanner.numberOfCameras;
setState(() {});
});
}
Future scan() async {
try {
var options = ScanOptions(
strings: {
"cancel": _cancelController.text,
"flash_on": _flashOnController.text,
"flash_off": _flashOffController.text,
},
restrictFormat: selectedFormats,
useCamera: _selectedCamera,
autoEnableFlash: _autoEnableFlash,
android: AndroidOptions(
aspectTolerance: _aspectTolerance,
useAutoFocus: _useAutoFocus,
),
);
var result = await BarcodeScanner.scan(options: options);
setState(() => scanResult = result);
} on PlatformException catch (e) {
var result = ScanResult(
type: ResultType.Error,
format: BarcodeFormat.unknown,
);
if (e.code == BarcodeScanner.cameraAccessDenied) {
setState(() {
result.rawContent = 'The user did not grant the camera permission!';
});
} else {
result.rawContent = 'Unknown error: $e';
}
setState(() {
scanResult = result;
});
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -106,7 +38,6 @@ class _AppBarActionState extends State<AppBarAction> {
onTap: () { onTap: () {
switch (widget.title) { switch (widget.title) {
case '扫一扫': case '扫一扫':
scan();
break; break;
case '消息': case '消息':
Navigator.pushNamed( Navigator.pushNamed(

@ -1,10 +1,26 @@
import 'package:akuCommunity/widget/bee_back_button.dart'; import 'package:akuCommunity/widget/bee_back_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class BeeScaffold extends StatefulWidget { class BeeScaffold extends StatefulWidget {
final String title; final String title;
final Widget body; final Widget body;
BeeScaffold({Key key, @required this.title, this.body}) : super(key: key);
/// appbar background color
///
/// default Colors.white
final Color bgColor;
final List<Widget> actions;
final Widget leading;
BeeScaffold(
{Key key,
@required this.title,
this.body,
this.actions,
this.leading,
this.bgColor})
: super(key: key);
@override @override
_BeeScaffoldState createState() => _BeeScaffoldState(); _BeeScaffoldState createState() => _BeeScaffoldState();
@ -16,11 +32,13 @@ class _BeeScaffoldState extends State<BeeScaffold> {
return Scaffold( return Scaffold(
backgroundColor: Color(0xFFF9F9F9), backgroundColor: Color(0xFFF9F9F9),
appBar: AppBar( appBar: AppBar(
backgroundColor: Colors.white, backgroundColor: widget.bgColor ?? Colors.white,
elevation: 0, elevation: 0,
title: Text(widget.title), title:
widget.title.text.size(32.sp).color(Color(0xFF333333)).bold.make(),
centerTitle: true, centerTitle: true,
leading: BeeBackButton(), leading: widget.leading ?? BeeBackButton(),
actions: widget.actions,
), ),
body: widget.body, body: widget.body,
); );

@ -1,3 +1,4 @@
import 'package:akuCommunity/pages/open_door_page/open_door_page.dart';
import 'package:akuCommunity/pages/setting_page/settings_page.dart'; import 'package:akuCommunity/pages/setting_page/settings_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -22,8 +23,7 @@ class GridButton extends StatelessWidget {
onTap: () { onTap: () {
switch (gridList[index]['title']) { switch (gridList[index]['title']) {
case '一键开门': case '一键开门':
Navigator.pushNamed( Get.to(OpenDoorPage());
context, PageName.open_door_page.toString());
break; break;
case '开门码': case '开门码':
Navigator.pushNamed( Navigator.pushNamed(

@ -99,13 +99,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
barcode_scan:
dependency: "direct main"
description:
name: barcode_scan
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -316,13 +309,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "5.2.1" version: "5.2.1"
fixnum:
dependency: transitive
description:
name: fixnum
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.10.11"
flare_dart: flare_dart:
dependency: transitive dependency: transitive
description: description:
@ -833,13 +819,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.5" version: "1.0.5"
protobuf:
dependency: transitive
description:
name: protobuf
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -868,6 +847,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
qr_code_scanner:
dependency: "direct main"
description:
name: qr_code_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
qr_flutter: qr_flutter:
dependency: "direct main" dependency: "direct main"
description: description:

@ -77,8 +77,8 @@ dependencies:
animate_do: ^1.7.3 animate_do: ^1.7.3
#动画alert #动画alert
rflutter_alert: ^1.1.0 rflutter_alert: ^1.1.0
#扫码
barcode_scan: ^3.0.1 qr_code_scanner: ^0.3.0
#时间选择 #时间选择
flutter_datetime_picker: ^1.4.0 flutter_datetime_picker: ^1.4.0
#随机二维码 #随机二维码

@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:akuCommunity/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
Loading…
Cancel
Save