universal_scroll_view 1.0.4 universal_scroll_view: ^1.0.4 copied to clipboard
Universal Scroll View is a cross platform package which base on Flutter framework.
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:universal_scroll_view/universal_single_child_scroll_view.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text('Flutter Demo Home Page'),
),
body: UniversalSingleChildScrollView(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(
50,
(index) => Container(
height: 500,
color: Colors.primaries[
Random().nextInt(Colors.primaries.length)],
child: Center(
child: Column(
children: [
Text(index.toString()),
Text("Supported browser scrolling event.")
],
),
),
))),
),
),
),
);
}
}