1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

testing_app code review and improvements (#960)

This commit is contained in:
Miguel Beltran
2021-12-11 07:39:07 +01:00
committed by GitHub
parent 664b63c03c
commit ea624af0f9
4 changed files with 22 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ import 'package:testing_app/models/favorites.dart';
import 'package:testing_app/screens/favorites.dart';
class HomePage extends StatelessWidget {
static String routeName = '/';
static const routeName = '/';
const HomePage({Key? key}) : super(key: key);
@@ -46,7 +46,7 @@ class ItemTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
var favoritesList = Provider.of<Favorites>(context);
final favoritesList = context.watch<Favorites>();
return Padding(
padding: const EdgeInsets.all(8.0),