Skip to content

Commit 713c4d8

Browse files
committed
Switch flutter channel to stable version
1 parent 453ec82 commit 713c4d8

24 files changed

+151
-157
lines changed

.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 0ba67226ee62d6c9d663a6f8410fb4b2f1076046
8-
channel: dev
7+
revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
8+
channel: stable
99

1010
project_type: app

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ Flutter reference and learning resources
3131
[all the example apps](https://github.com/iampawan/FlutterExampleApps)
3232
[A curated list of samples](https://github.com/flutter/samples/blob/master/INDEX.md)
3333
[Plugins for Flutter](https://github.com/flutter/plugins/tree/master/packages)
34-
[Dart Packages](https://pub.dev/)
34+
[Dart Packages](https://pub.dev/)
35+
[闲鱼团队技术分享](https://www.yuque.com/xytech/flutter/)

README.zh-CN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ flutter参考及学习资源
3131
[FlutterExampleApps](https://github.com/iampawan/FlutterExampleApps)
3232
[精选的样本列表](https://github.com/flutter/samples/blob/master/INDEX.md)
3333
[Flutter插件](https://github.com/flutter/plugins/tree/master/packages)
34-
[Dart Packges](https://pub.dev/)
34+
[Dart Packges](https://pub.dev/)
35+
[闲鱼团队技术分享](https://www.yuque.com/xytech/flutter/)

android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ android {
3333

3434
defaultConfig {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36-
applicationId "com.example.myapp"
36+
applicationId "com.example.example"
3737
minSdkVersion 16
3838
targetSdkVersion 28
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
41-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
41+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
4242
}
4343

4444
buildTypes {
@@ -56,6 +56,6 @@ flutter {
5656

5757
dependencies {
5858
testImplementation 'junit:junit:4.12'
59-
androidTestImplementation 'androidx.test:runner:1.1.1'
60-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
59+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
60+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
6161
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.myapp">
2+
package="com.example.example">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.myapp">
2+
package="com.example.example">
33

44
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
55
calls FlutterMain.startInitialization(this); in its onCreate method.
@@ -8,7 +8,7 @@
88
FlutterApplication and put your custom class here. -->
99
<application
1010
android:name="io.flutter.app.FlutterApplication"
11-
android:label="myapp"
11+
android:label="example"
1212
android:icon="@mipmap/ic_launcher">
1313
<activity
1414
android:name=".MainActivity"
@@ -24,9 +24,6 @@
2424
<meta-data
2525
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
2626
android:value="true" />
27-
<meta-data
28-
android:name="com.google.android.geo.API_KEY"
29-
android:value="API_KEY" />
3027
<intent-filter>
3128
<action android:name="android.intent.action.MAIN"/>
3229
<category android:name="android.intent.category.LAUNCHER"/>

android/app/src/main/java/com/example/myapp/MainActivity.java renamed to android/app/src/main/java/com/example/example/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.myapp;
1+
package com.example.example;
22

33
import android.os.Bundle;
44
import io.flutter.app.FlutterActivity;

android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.myapp">
2+
package="com.example.example">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.51'
32
repositories {
43
google()
54
jcenter()
65
}
76

87
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.3.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
8+
classpath 'com.android.tools.build:gradle:3.2.1'
119
}
1210
}
1311

android/gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableJetifier=true
3-
android.useAndroidX=true

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
"$(inherited)",
324324
"$(PROJECT_DIR)/Flutter",
325325
);
326-
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
326+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
327327
PRODUCT_NAME = "$(TARGET_NAME)";
328328
VERSIONING_SYSTEM = "apple-generic";
329329
};
@@ -448,7 +448,7 @@
448448
"$(inherited)",
449449
"$(PROJECT_DIR)/Flutter",
450450
);
451-
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
451+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
452452
PRODUCT_NAME = "$(TARGET_NAME)";
453453
VERSIONING_SYSTEM = "apple-generic";
454454
};
@@ -471,7 +471,7 @@
471471
"$(inherited)",
472472
"$(PROJECT_DIR)/Flutter",
473473
);
474-
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
474+
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
475475
PRODUCT_NAME = "$(TARGET_NAME)";
476476
VERSIONING_SYSTEM = "apple-generic";
477477
};

ios/Runner/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
14-
<string>myapp</string>
14+
<string>example</string>
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>

lib/main.dart

Lines changed: 33 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
/*
2-
* 模仿Instagram APP示例
3-
*/
4-
// import 'package:flutter/material.dart';
5-
// import 'package:myapp/pages/Instagram/home.dart';
1+
import 'package:flutter/material.dart';
2+
import 'package:example/pages/Instagram/home.dart';
63

7-
// void main() => runApp(MyApp());
4+
void main() => runApp(MyApp());
85

9-
// class MyApp extends StatelessWidget {
10-
// @override
11-
// Widget build(BuildContext context) {
12-
// return MaterialApp(
13-
// title: 'Instagram',
14-
// debugShowCheckedModeBanner: false,
15-
// theme: ThemeData(
16-
// primarySwatch: Colors.blue,
17-
// primaryColor: Colors.black,
18-
// primaryIconTheme: IconThemeData(color: Colors.black),
19-
// primaryTextTheme: TextTheme(
20-
// title: TextStyle(color: Colors.black, fontFamily: "Aveny")),
21-
// textTheme: TextTheme(title: TextStyle(color: Colors.black))),
22-
// home: InstagramHome(),
23-
// );
24-
// }
25-
// }
6+
class MyApp extends StatelessWidget {
7+
@override
8+
Widget build(BuildContext context) {
9+
return MaterialApp(
10+
title: 'Instagram',
11+
debugShowCheckedModeBanner: false,
12+
theme: ThemeData(
13+
primarySwatch: Colors.blue,
14+
primaryColor: Colors.black,
15+
primaryIconTheme: IconThemeData(color: Colors.black),
16+
primaryTextTheme: TextTheme(
17+
title: TextStyle(color: Colors.black, fontFamily: "Aveny")),
18+
textTheme: TextTheme(title: TextStyle(color: Colors.black))),
19+
home: InstagramHome(),
20+
);
21+
}
22+
}
2623

2724
/*
2825
* AvailableKittens APP示例
2926
*/
3027
// import 'package:flutter/material.dart';
31-
// import 'package:myapp/pages/AvailableKittens/AvailableKittens.dart';
28+
// import 'package:example/pages/AvailableKittens/AvailableKittens.dart';
3229

3330
// void main() => runApp(MyApp());
3431

@@ -46,7 +43,7 @@
4643
* 参考: https://google.github.io/charts/flutter/gallery.html
4744
*/
4845
// import 'package:flutter/material.dart';
49-
// import 'package:myapp/pages/Charts/home.dart';
46+
// import 'package:example/pages/Charts/home.dart';
5047

5148
// void main() => runApp(MyApp());
5249

@@ -68,7 +65,7 @@
6865
* 签名APP示例
6966
*/
7067
// import 'package:flutter/material.dart';
71-
// import 'package:myapp/pages/Signature/home.dart';
68+
// import 'package:example/pages/Signature/home.dart';
7269

7370
// void main() => runApp(MyApp());
7471

@@ -104,68 +101,19 @@
104101
*/
105102

106103
/*
107-
* 基础组件使用
108-
* next https://github.com/ibhavikmakwana/FlutterPlayground
104+
* Beautiful Material Search App
105+
* next https://www.youtube.com/watch?v=FPcl1tu0gDs
109106
*/
110-
import 'dart:async';
111-
112-
import 'package:flutter/material.dart';
113-
import 'package:google_maps_flutter/google_maps_flutter.dart';
114-
115-
void main() => runApp(MyApp());
116107

117-
class MyApp extends StatelessWidget {
118-
@override
119-
Widget build(BuildContext context) {
120-
return MaterialApp(
121-
title: 'Flutter Google Maps Demo',
122-
home: MapSample(),
123-
);
124-
}
125-
}
126-
127-
class MapSample extends StatefulWidget {
128-
@override
129-
State<MapSample> createState() => MapSampleState();
130-
}
131-
132-
class MapSampleState extends State<MapSample> {
133-
Completer<GoogleMapController> _controller = Completer();
134-
135-
static final CameraPosition _kGooglePlex = CameraPosition(
136-
target: LatLng(37.42796133580664, -122.085749655962),
137-
zoom: 14.4746,
138-
);
139-
140-
static final CameraPosition _kLake = CameraPosition(
141-
bearing: 192.8334901395799,
142-
target: LatLng(37.43296265331129, -122.08832357078792),
143-
tilt: 59.440717697143555,
144-
zoom: 19.151926040649414);
145-
146-
@override
147-
Widget build(BuildContext context) {
148-
return new Scaffold(
149-
body: GoogleMap(
150-
mapType: MapType.hybrid,
151-
initialCameraPosition: _kGooglePlex,
152-
onMapCreated: (GoogleMapController controller) {
153-
_controller.complete(controller);
154-
},
155-
),
156-
floatingActionButton: FloatingActionButton.extended(
157-
onPressed: _goToTheLake,
158-
label: Text('To the lake!'),
159-
icon: Icon(Icons.directions_boat),
160-
),
161-
);
162-
}
108+
/*
109+
* Provider
110+
* next https://juejin.im/post/5d00a84fe51d455a2f22023f
111+
*/
163112

164-
Future<void> _goToTheLake() async {
165-
final GoogleMapController controller = await _controller.future;
166-
controller.animateCamera(CameraUpdate.newCameraPosition(_kLake));
167-
}
168-
}
113+
/*
114+
* 基础组件使用
115+
* next https://github.com/ibhavikmakwana/FlutterPlayground
116+
*/
169117

170118

171119

lib/main2.dart

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import 'package:flutter/material.dart';
2+
3+
void main() => runApp(MyApp());
4+
5+
class MyApp extends StatelessWidget {
6+
@override
7+
Widget build(BuildContext context) {
8+
return MaterialApp(
9+
title: 'Flutter Demo',
10+
theme: ThemeData(
11+
primarySwatch: Colors.blue,
12+
),
13+
home: MyHomePage(title: 'Flutter Demo Home Page'),
14+
);
15+
}
16+
}
17+
18+
class MyHomePage extends StatefulWidget {
19+
MyHomePage({Key key, this.title}) : super(key: key);
20+
21+
final String title;
22+
23+
@override
24+
_MyHomePageState createState() => _MyHomePageState();
25+
}
26+
27+
class _MyHomePageState extends State<MyHomePage> {
28+
int _counter = 0;
29+
30+
void _incrementCounter() {
31+
setState(() {
32+
_counter++;
33+
});
34+
}
35+
36+
@override
37+
Widget build(BuildContext context) {
38+
return Scaffold(
39+
appBar: AppBar(
40+
title: Text(widget.title),
41+
),
42+
body: Center(
43+
child: Column(
44+
mainAxisAlignment: MainAxisAlignment.center,
45+
children: <Widget>[
46+
Text(
47+
'You have pushed the button this many times:',
48+
),
49+
Text(
50+
'$_counter',
51+
style: Theme.of(context).textTheme.display1,
52+
),
53+
],
54+
),
55+
),
56+
floatingActionButton: FloatingActionButton(
57+
onPressed: _incrementCounter,
58+
tooltip: 'Increment',
59+
child: Icon(Icons.add),
60+
),
61+
);
62+
}
63+
}

lib/pages/Charts/chart.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:charts_flutter/flutter.dart';
3-
import 'package:myapp/pages/Charts/schedule.dart';
3+
import 'package:example/pages/Charts/schedule.dart';
44
import 'package:provider/provider.dart';
55

66
class MyChart extends StatelessWidget {

lib/pages/Charts/home.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
2-
import 'package:myapp/pages/Charts/chart.dart';
3-
import 'package:myapp/pages/Charts/schedule.dart';
4-
import 'package:myapp/pages/Charts/slider.dart';
2+
import 'package:example/pages/Charts/chart.dart';
3+
import 'package:example/pages/Charts/schedule.dart';
4+
import 'package:example/pages/Charts/slider.dart';
55
import 'package:provider/provider.dart';
66

77
class PieChart extends StatelessWidget {

lib/pages/Charts/slider.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:myapp/pages/Charts/schedule.dart';
2+
import 'package:example/pages/Charts/schedule.dart';
33
import 'package:provider/provider.dart';
44

55
class MySlider extends StatefulWidget {

0 commit comments

Comments
 (0)