touch_mouse_behavior 0.0.2 copy "touch_mouse_behavior: ^0.0.2" to clipboard
touch_mouse_behavior: ^0.0.2 copied to clipboard

Scroll behavior to support both Touch and Mouse for web in scrollable widgets.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:touch_mouse_behavior/touch_mouse_behavior.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: TouchMouseScrollable(
        child: SingleChildScrollView(
          child: Column(
              children: const [
                Text('Hello'),
                Text('World'),
                Text('!'),
              ]
          ),
        ),
      ),
    );
  }
}
15
likes
160
points
177
downloads

Publisher

verified publisherbuildtoapp.com

Weekly Downloads

Scroll behavior to support both Touch and Mouse for web in scrollable widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on touch_mouse_behavior