Skip to content

Instantly share code, notes, and snippets.

@timbergus
Created June 10, 2019 13:12
Show Gist options
  • Save timbergus/68f74ffc331ba22c5ab55b753d69fcc3 to your computer and use it in GitHub Desktop.
Save timbergus/68f74ffc331ba22c5ab55b753d69fcc3 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:routing_with_flutter/routes/route_a.dart';
import 'package:routing_with_flutter/routes/route_b.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.green,
),
routes: {
'/': (context) => ViewA(),
'/view_b': (context) => ViewB(),
},
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment