mirror of
https://github.com/kphanipavan/modal_progress_hud_nsn.git
synced 2025-10-29 06:42:50 -07:00
linting and maintainance
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
|
||||
|
||||
@@ -7,17 +6,17 @@ void main() {
|
||||
group('Modal Progress HUD', () {
|
||||
Widget sut(bool inAsyncCall, Offset? offset) {
|
||||
return MaterialApp(
|
||||
home: new ModalProgressHUD(
|
||||
home: ModalProgressHUD(
|
||||
inAsyncCall: inAsyncCall,
|
||||
offset: offset,
|
||||
child: Text(''),
|
||||
child: const Text(''),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
testWidgets('should show progress indicator when in async call',
|
||||
(tester) async {
|
||||
final inAsyncCall = true;
|
||||
const inAsyncCall = true;
|
||||
await tester.pumpWidget(sut(inAsyncCall, null));
|
||||
|
||||
expect(find.byType(Text), findsOneWidget);
|
||||
@@ -26,7 +25,7 @@ void main() {
|
||||
|
||||
testWidgets('should not show progress indicator when not in async call',
|
||||
(tester) async {
|
||||
final inAsyncCall = false;
|
||||
const inAsyncCall = false;
|
||||
await tester.pumpWidget(sut(inAsyncCall, null));
|
||||
|
||||
expect(find.byType(Text), findsOneWidget);
|
||||
@@ -35,8 +34,8 @@ void main() {
|
||||
|
||||
testWidgets('should allow positioning of progress indicator',
|
||||
(tester) async {
|
||||
final inAsyncCall = true;
|
||||
final offset = Offset(0.1, 0.1);
|
||||
const inAsyncCall = true;
|
||||
const offset = Offset(0.1, 0.1);
|
||||
await tester.pumpWidget(sut(inAsyncCall, offset));
|
||||
|
||||
expect(find.byType(Positioned), findsOneWidget);
|
||||
@@ -44,4 +43,4 @@ void main() {
|
||||
expect(find.byType(CircularProgressIndicator), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user