Skip to content

Commit

Permalink
+ main builder => sroll_behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio-web committed Jan 25, 2022
1 parent aaa9abd commit 0b5eaf6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.fabiom.speed_test_app">
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:label="Speed Test"
android:name="${applicationName}"
Expand Down
9 changes: 9 additions & 0 deletions lib/app/core/utils/scroll_behavior.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'package:flutter/material.dart';

class MyBehavior extends ScrollBehavior {
@override
Widget buildOverscrollIndicator(
BuildContext context, Widget child, ScrollableDetails details) {
return child;
}
}
7 changes: 6 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:speed_test_app/app/core/utils/scroll_behavior.dart';
import 'package:speed_test_app/app/data/services/storage/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:speed_test_app/app/modules/home/binding.dart';
Expand All @@ -26,7 +27,11 @@ class Application extends StatelessWidget {
),
home: const HomePage(),
initialBinding: HomeBinding(),
builder: EasyLoading.init(),
builder: (context, child) {
child = EasyLoading.init()(context, child);
child = ScrollConfiguration(behavior: MyBehavior(), child: child);
return child;
},
);
}
}

0 comments on commit 0b5eaf6

Please sign in to comment.