v9
This commit is contained in:
@@ -17,6 +17,18 @@ class _ColorPageState extends State<ColorPage> {
|
||||
Colors.pinkAccent, Colors.purpleAccent, Colors.indigoAccent, Colors.amberAccent, Colors.cyanAccent,
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
print('======_ColorPageState#initState==============');
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
print('======_ColorPageState#dispose==============');
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -38,12 +50,12 @@ class _ColorPageState extends State<ColorPage> {
|
||||
void _selectColor(Color color){
|
||||
// String value = color.value.toRadixString(16);
|
||||
// router.path = '/color/detail?color=$value';
|
||||
router.changePath('/color/detail_error',extra: color);
|
||||
router.changePath('/app/color/detail',extra: color);
|
||||
|
||||
}
|
||||
|
||||
void _toAddPage() async {
|
||||
Color? color = await router.changePath('/color/add',forResult: true,recordHistory: false);
|
||||
Color? color = await router.changePath('/app/color/add',forResult: true,recordHistory: false);
|
||||
if (color != null) {
|
||||
setState(() {
|
||||
_colors.add(color);
|
||||
|
||||
@@ -10,6 +10,18 @@ class CounterPage extends StatefulWidget {
|
||||
class _CounterPageState extends State<CounterPage> {
|
||||
int _counter = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
print('======_CounterPageState#initState==============');
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
print('======_CounterPageState#dispose==============');
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _incrementCounter() {
|
||||
setState(() {
|
||||
_counter++;
|
||||
|
||||
24
lib/v9/pages/login/login.dart
Normal file
24
lib/v9/pages/login/login.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../app/navigation/router/app_router_delegate.dart';
|
||||
|
||||
class LoginPage extends StatelessWidget {
|
||||
const LoginPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('Login Page',style: TextStyle(fontSize: 24),),
|
||||
const SizedBox(height: 20,),
|
||||
ElevatedButton(onPressed: (){
|
||||
router.changePath('/app/color');
|
||||
}, child: Text('点击进入'))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -38,26 +38,27 @@ class _SortSettingsState extends State<SortSettings> {
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
leading: Align(
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Container(
|
||||
width: 28,
|
||||
height: 28,
|
||||
margin: EdgeInsets.only(right: 8,left: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xffE3E5E7),
|
||||
borderRadius: BorderRadius.circular(6)
|
||||
),
|
||||
child: Icon(Icons.arrow_back_ios_new,size: 18,)),
|
||||
),
|
||||
),
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
// leading: Align(
|
||||
// child: MouseRegion(
|
||||
// cursor: SystemMouseCursors.click,
|
||||
// child: GestureDetector(
|
||||
// onTap: (){
|
||||
// Navigator.of(context).pop();
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 28,
|
||||
// height: 28,
|
||||
// margin: EdgeInsets.only(right: 8,left: 8),
|
||||
// alignment: Alignment.center,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Color(0xffE3E5E7),
|
||||
// borderRadius: BorderRadius.circular(6)
|
||||
// ),
|
||||
// child: Icon(Icons.arrow_back_ios_new,size: 18,)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// leading: BackButton(),
|
||||
actions: [
|
||||
Padding(
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:iroute/v9/app/navigation/router/iroute_config.dart';
|
||||
import '../player/sort_player.dart';
|
||||
import '../../../../app/navigation/router/app_router_delegate.dart';
|
||||
import '../settings/sort_setting.dart';
|
||||
@@ -10,14 +11,10 @@ import 'sort_button.dart';
|
||||
import '../../functions.dart';
|
||||
import '../../provider/state.dart';
|
||||
|
||||
class SortPage extends StatefulWidget {
|
||||
const SortPage({super.key});
|
||||
class SortNavigation extends StatelessWidget {
|
||||
final Widget navigator;
|
||||
const SortNavigation({super.key, required this.navigator});
|
||||
|
||||
@override
|
||||
State<SortPage> createState() => _SortPageState();
|
||||
}
|
||||
|
||||
class _SortPageState extends State<SortPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
@@ -31,7 +28,7 @@ class _SortPageState extends State<SortPage> {
|
||||
width: 1,
|
||||
),
|
||||
Expanded(
|
||||
child: SortNavigatorScope(),
|
||||
child: navigator,
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -68,7 +65,7 @@ class SortRailPanel extends StatelessWidget {
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
router.changePath('/sort/settings');
|
||||
router.changePath('/app/sort/settings',style: RouteStyle.push);
|
||||
},
|
||||
child: const Icon(
|
||||
CupertinoIcons.settings,
|
||||
@@ -87,7 +84,7 @@ class SortRailPanel extends StatelessWidget {
|
||||
options: sortNameMap.values.toList(),
|
||||
onSelected: (name) {
|
||||
state.selectName(name);
|
||||
router.changePath('/sort');
|
||||
router.changePath('/sort/player');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user