mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
结构初始化
This commit is contained in:
14
lib/core/route.dart
Normal file
14
lib/core/route.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/core/analysis.dart';
|
||||
|
||||
class AppRoute {
|
||||
final Widget page;
|
||||
final String title;
|
||||
|
||||
AppRoute(this.page, this.title);
|
||||
|
||||
void go(BuildContext context) {
|
||||
Analysis.recordView(title);
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => page));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user