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:
@@ -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(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user