|
@@ -1,4 +1,7 @@
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
+import 'package:flutter_hooks/flutter_hooks.dart';
|
|
|
|
+import 'package:musicplayer/router.dart';
|
|
|
|
+
|
|
|
|
|
|
void main() {
|
|
void main() {
|
|
runApp(App());
|
|
runApp(App());
|
|
@@ -10,18 +13,8 @@ class App extends StatelessWidget {
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
return MaterialApp(
|
|
title:'my first flutter',
|
|
title:'my first flutter',
|
|
- home: Page1(),
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class Page1 extends StatelessWidget{
|
|
|
|
- Widget build(BuildContext context) {
|
|
|
|
- return Scaffold(
|
|
|
|
- appBar: AppBar(title: Text('页面1')),
|
|
|
|
- body: Text('a'),
|
|
|
|
|
|
+ routes: routes,
|
|
|
|
+ initialRoute: '/',
|
|
);
|
|
);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|