# Sixshot **Repository Path**: harisucici/sixshot ## Basic Information - **Project Name**: Sixshot - **Description**: 至诚学车学员 App - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-10-09 - **Last Updated**: 2020-12-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # app_flutter A new flutter module project. ## Getting Started For help getting started with Flutter, view our online [documentation](https://flutter.io/). JSON https://javiercbk.github.io/json_to_dart/ 1. @JsonSerializable() 2. flutter packages pub run build_runner build Amap io.flutter.embedded_views_preview NSLocationWhenInUseUsageDescription 需要用到定位 UIBackgroundModes location NSAppTransportSecurity NSAllowsArbitraryLoads implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.annotation:annotation:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' flutter run --target-platform android-arm ///// 数据模型 //class CountModel { // final int count;//计数器 // // // // // // // final VoidCallback increment;//增长函数 // const CountModel(this.count,this.increment); //} // //class CountWidget extends InheritedWidget { // final CountModel countModel; // CountWidget({ // Key key, // @required this.countModel, // @required Widget child, // }) : super(key: key, child: child); // // static CountWidget of(BuildContext context) {//提供数据模型方法 // return context.inheritFromWidgetOfExactType(CountWidget); // } // // //是否重建widget就取决于数据是否相同 // @override // bool updateShouldNotify(CountWidget oldWidget) { // return countModel.count != oldWidget.countModel.count; // } //} // //class MainPage extends StatefulWidget { // @override // _MainPageState createState() => _MainPageState(); //} // //class _MainPageState extends State { // int _counter = 0; // // @override // Widget build(BuildContext context) { // return // CountWidget(child: WidgetA(),countModel: CountModel(_counter, _incrementCounter),); // } // // void _incrementCounter() { // setState(() { // _counter++; // }); // } //} // //class WidgetA extends StatelessWidget { // @override // Widget build(BuildContext context) { // var result= Scaffold( // body: WidgetB(), // floatingActionButton: WidgetF(), // ); // return result; // } //} // //class WidgetB extends StatelessWidget { // @override // Widget build(BuildContext context) { // var center= Center( // child: WidgetC(), // ); // return center; // } //} // //class WidgetC extends StatelessWidget { // @override // Widget build(BuildContext context) { // var column=Column( // mainAxisAlignment: MainAxisAlignment.center, // children: [ // Text('You have pushed the button this many times:',), // WidgetD() // ], // ); // return column; // } //} // //class WidgetD extends StatelessWidget { // @override // Widget build(BuildContext context) { // var counter= CountWidget.of(context).countModel.count; // var text= Text('$counter', style: Theme.of(context).textTheme.display1,); // return text; // } //} // //class WidgetF extends StatelessWidget { // @override // Widget build(BuildContext context) { // var button= FloatingActionButton( // onPressed: CountWidget.of(context).countModel.increment, // child: Icon(Icons.add), // ); // return button; // } //} 登录--