1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/testing_app/lib/main.dart
Brett Morgan 58bc5d7a58 Deps update, utilize super.key (#1265)
* Deps update, utilize `super.key`

* `flutter format`
2022-05-13 12:31:56 -07:00

37 lines
1.1 KiB
Dart

// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:testing_app/models/favorites.dart';
import 'package:testing_app/screens/favorites.dart';
import 'package:testing_app/screens/home.dart';
void main() {
runApp(const TestingApp());
}
class TestingApp extends StatelessWidget {
const TestingApp({super.key});
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<Favorites>(
create: (context) => Favorites(),
child: MaterialApp(
title: 'Testing Sample',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
routes: {
HomePage.routeName: (context) => const HomePage(),
FavoritesPage.routeName: (context) => const FavoritesPage(),
},
initialRoute: HomePage.routeName,
),
);
}
}