@@ -2,20 +2,23 @@ import 'package:flutter/cupertino.dart';
2
2
import 'package:flutter/material.dart' ;
3
3
import 'package:fluttertoast/fluttertoast.dart' ;
4
4
import 'package:leancloud_storage/leancloud.dart' ;
5
+ import 'package:learn_flutter/leancloud_config.dart' ;
5
6
import 'package:learn_flutter/pages/home/index.dart' ;
6
7
import 'package:learn_flutter/pages/item_info/index.dart' ;
7
8
import 'package:learn_flutter/pages/login/login.dart' ;
8
9
import 'package:learn_flutter/pages/mine/index.dart' ;
9
10
import 'package:learn_flutter/pages/movie/movie.dart' ;
11
+ import 'package:learn_flutter/pages/settings/settings.dart' ;
10
12
import 'package:learn_flutter/pages/webview_page/index.dart' ;
11
13
12
14
void main () {
13
15
initLeancloud ();
14
16
return runApp (MyApp ());
15
17
}
16
18
19
+ /// 初始化LeanCloud
17
20
initLeancloud () {
18
- LeanCloud .initialize ();
21
+ LeanCloud .initialize (LeanCloudConfig . APP_ID , LeanCloudConfig . APP_KEY , server : LeanCloudConfig . SERVER );
19
22
}
20
23
21
24
class MyApp extends StatelessWidget {
@@ -25,6 +28,7 @@ class MyApp extends StatelessWidget {
25
28
'/movie' : (context, settings) => Movie (),
26
29
'/mine' : (context, settings) => Mine (),
27
30
'/item_info' : (context, settings) => ItemInfo (),
31
+ '/settings' : (context, settings) => Settings (),
28
32
'/webview' : (context, settings) =>
29
33
WebViewPage (url: (settings.arguments as Map <String , String >)['url' ])
30
34
};
0 commit comments