route_handlers.dart 730 B

123456789101112131415161718192021
  1. /*
  2. * fluro
  3. * A Posse Production
  4. * http://goposse.com
  5. * Copyright (c) 2017 Posse Productions LLC. All rights reserved.
  6. * See LICENSE for distribution and usage details.
  7. */
  8. import 'package:flutter/painting.dart';
  9. import 'package:router/fluro.dart';
  10. import 'package:router_example/helpers/color_helpers.dart';
  11. import 'package:router_example/screens/test_screen_01.dart';
  12. RouteHandler showDemoHandler = (Map<String, String> params) {
  13. String message = params["message"];
  14. String colorHex = params["color_hex"];
  15. Color color = new Color(0xFFFFFFFF);
  16. if (colorHex != null && colorHex.length > 0) {
  17. color = new Color(ColorHelpers.fromHexString(colorHex));
  18. }
  19. return new TestScreen01(message: message, color: color);
  20. };