fluro
github地址: https://github.com/theyakka/fluro
1 在pubspec.yaml
中引入fluro
dependencies:
fluro: ^1.5.1
2. 基本使用步骤
- 创建
Routes.dart
, 统一管理路由
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import './route_handlers.dart';
class Routes {
static Router _router;
static String webview = "/webview";
static void configureRoutes(Router router) {
_router = router;
router.notFoundHandler = Handler(
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
<