first commit
This commit is contained in:
17
siro_rider/packages/get_storage/example/test/test.dart
Normal file
17
siro_rider/packages/get_storage/example/test/test.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:get_storage/get_storage.dart';
|
||||
|
||||
void main() {
|
||||
final counter = 'counter';
|
||||
final isDarkMode = 'isDarkMode';
|
||||
GetStorage box = GetStorage();
|
||||
test('GetStorage read and write operation', () {
|
||||
box.write(counter, 0);
|
||||
expect(box.read(counter), 0);
|
||||
});
|
||||
|
||||
test('save the state of brightness mode of app in GetStorage', () {
|
||||
box.write(isDarkMode, true);
|
||||
expect(box.read(isDarkMode), true);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility that Flutter provides. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {});
|
||||
}
|
||||
Reference in New Issue
Block a user