fair 0.2.0+3 fair: ^0.2.0+3 copied to clipboard
Flutter Fair is a package used to update widget tree dynamically.
/*
* Copyright (C) 2005-present, 58.com. All rights reserved.
* Use of this source code is governed by a BSD type license that can be
* found in the LICENSE file.
*/
import 'package:fair/fair.dart';
import 'package:fair_example/src/page/modules.dart';
import 'package:flutter/material.dart';
import 'src/page/hello_world_proxy.dart';
import 'src/page/sample_dynamic_page.dart';
void main() {
runApp(FairApp(
delegate: {
'hello_world': (ctx, _) => HelloWorldDelegate(),
},
modules: {
ShowFairAlertModule.tagName: () => ShowFairAlertModule(),
},
child: MaterialApp(
home: FairWidget(
name: 'hello_world',
path: 'assets/bundle/lib_src_page_hello_world.fair.bin',
) /*HelloWorldPage()*/,
routes: {
'sample_dynamic_page': (_) => SampleDynamicPage(),
},
),
));
}