fluro/example/lib/config/route_handlers.dart

21 lines
731 B
Dart
Raw Normal View History

2017-05-14 00:28:28 -04:00
/*
* router
* A Posse Production
* http://goposse.com
* Copyright (c) 2017 Posse Productions LLC. All rights reserved.
* See LICENSE for distribution and usage details.
*/
import 'package:flutter/painting.dart';
2017-05-14 00:55:44 -04:00
import 'package:router/fluro.dart';
2017-05-14 00:28:28 -04:00
import 'package:router_example/helpers/color_helpers.dart';
import 'package:router_example/screens/test_screen_01.dart';
RouteHandler showDemoHandler = (Map<String, String> params) {
String message = params["message"];
String colorHex = params["color_hex"];
Color color = new Color(0xFFFFFFFF);
if (colorHex != null && colorHex.length > 0) {
color = new Color(ColorHelpers.fromHexString(colorHex));
}
return new TestScreen01(message: message, color: color);
};