1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-28 15:21:30 +00:00

Add flutter_lints (#813)

This commit is contained in:
Brett Morgan
2021-06-08 08:56:21 +10:00
committed by GitHub
parent 78dee899ea
commit fc1fe989fb
5 changed files with 56 additions and 16 deletions

View File

@@ -10,8 +10,10 @@ import 'package:provider/provider.dart';
class MockCounterModel extends ChangeNotifier implements CounterModel {
int _count = 0;
@override
int get count => _count;
@override
void increment() {
_count++;
notifyListeners();
@@ -19,13 +21,13 @@ class MockCounterModel extends ChangeNotifier implements CounterModel {
}
void main() {
testWidgets('MiniView smoke test', (WidgetTester tester) async {
testWidgets('MiniView smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(
MaterialApp(
home: ChangeNotifierProvider<CounterModel>.value(
value: MockCounterModel(),
child: Contents(),
child: const Contents(),
),
),
);