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

Add flutter_lints to add_to_app/plugin/flutter_module_using_plugin (#812)

This commit is contained in:
Brett Morgan
2021-06-08 08:18:20 +10:00
committed by GitHub
parent a405fc4a9d
commit c8112c88ac
6 changed files with 71 additions and 31 deletions

View File

@@ -6,16 +6,17 @@
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_module_using_plugin/main.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
class MockCounterModel extends ChangeNotifier implements CounterModel {
int _count = 0;
@override
int get count => _count;
@override
void increment() {
_count++;
notifyListeners();
@@ -23,13 +24,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(),
),
),
);