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

Scroll behavior to support both Touch and Mouse in web and desktop (Windows, Macos, Linux) for 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
179
downloads

Publisher

verified publisherbuildtoapp.com

Weekly Downloads

Scroll behavior to support both Touch and Mouse in web and desktop (Windows, Macos, Linux) for scrollable widgets.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on touch_mouse_behavior