scroll_cool_widget

Creator: coderz1093

Last updated:

0 purchases

scroll_cool_widget Image
scroll_cool_widget Images
Add to Cart

Description:

scroll cool widget

scroll_cool_widget #



Vertical scroll
Horizontal scroll









Getting started #
In your pubspec.yaml
dependencies:
scroll_cool_widget: ^0.0.1
copied to clipboard
import 'package:scroll_cool_widget/scroll_cool_widget.dart';
copied to clipboard
Usage #
With default settings (without back button) #
ScrollCoolWidget(
countOfCache: 10,
height: (MediaQuery.of(context).size.height),
width: (MediaQuery.of(context).size.width),

createWidget: (index, width, height) {
return Container(
width: width,
height: height,
color: Color((Random().nextDouble() * 0xFFFFFF).toInt()).withOpacity(1.0),
child: Center(
child: Text('${index + 1}',
style: const TextStyle(
fontSize: 30,
),
),
),
);
},
)
copied to clipboard
With custom settings (with back button) #
ScrollCoolWidget(
countOfCache: 10,
height: (MediaQuery.of(context).size.height),
width: (MediaQuery.of(context).size.width),
scrollDirection: Axis.vertical,
buttonPosition: ButtonPosition.topLeft,
buttonColor: Colors.blueAccent,
buttonIconColor: Colors.white,

createWidget: (index, width, height) {
return Container(
width: width,
height: height,
color: Color((Random().nextDouble() * 0xFFFFFF).toInt()).withOpacity(1.0),
child: Center(
child: Text('${index + 1}',
style: const TextStyle(
fontSize: 30,
),
),
),
);
},
)
copied to clipboard
Parameters #



Parameters
Description




Widget Function(int index, double width, double height) createWidget
Function for creating new widgets by index


int countOfCache
Count of widgets which will be loaded in advance


double width
Width of page


double height
Height of page


Axis scrollDirection
Direction of scrolling


ButtonPosition buttonPosition
Position of button for back


Color buttonColor
Color of button for back


Color buttonIconColor
Color of icon in button for back



ButtonPosition #
Available values:

ButtonPosition.none - default
ButtonPosition.topLeft
ButtonPosition.topRight
ButtonPosition.bottomLeft
ButtonPosition.bottomRight

License #
Here is using MIT license.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator