Search
 
SCRIPT & CODE EXAMPLE
 

DART

scroll with mouse in flutter

class MyCustomScrollBehavior extends MaterialScrollBehavior {
  // Override behavior methods and getters like dragDevices
  @override
  Set<PointerDeviceKind> get dragDevices => { 
    PointerDeviceKind.touch,
    PointerDeviceKind.mouse,
    // etc.
  };
}

// ScrollBehavior can be set for a specific widget.
final ScrollController controller = ScrollController();
ScrollConfiguration(
  behavior: MyCustomScrollBehavior(),
  child: ListView.builder(
    controller: controller,
    itemBuilder: (BuildContext context, int index) {
     return Text('Item $index');
    }
  ),
);
Comment

PREVIOUS NEXT
Code Example
Dart :: how to refresh a listview in flutter 
Dart :: Flutter bottom navigation bar change page programmatically 
Dart :: flutter extend two classes 
Dart :: flutter icon color 
Dart :: dart check runtime type 
Dart :: ClipRRect for flutter 
Dart :: Autocomplete Widget in Flutter 
Dart :: dart httop client 
Dart :: vertically Center a Text in Flutter 
Dart :: create a int list dart 
Dart :: add fullscreen modal on a page in flutter app 
Dart :: signing the app flutter 
Dart :: How do I use hexadecimal color strings in Flutter? 
Dart :: Drawer Header set text positon 
Dart :: flutter encode 
Dart :: flutter logo text color 
Dart :: flutter remove character from string 
Dart :: flutter get language code 
Dart :: var keys = snap.value.keys; 
Dart :: onpressed null flutter 
Dart :: flutter show dialog on start 
Dart :: animation in flutter 
Dart :: dart list slice 
Dart :: git : open another branch ( like clone ) 
Dart :: flutter image size percentage 
Swift :: swift int to octal 
Swift :: swift view float on keyboard show 
Swift :: Preload database in app with Realm swift 
Swift :: get current unix timestamp swift ios 
Swift :: Save class in userdefaults ios swift 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =