GithubHelp home page GithubHelp logo

custom_slider's Introduction

Custom Slider

Custom Slider package lets you add a beautiful slider Track gradient and Image on SliderThumb to your Flutter app.

Getting started

Installation

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  custom_slider: ^0.0.3
  1. Import the package and use it in your Flutter App.
import 'package:custom_slider/custom_slider.dart';

Example

There are a number of properties that you can modify:

  • assetImage
  • linearGradient
  • inActiveTrackColor
  • trackHeight;
  • min;
  • max;
  • assetImageHeight;
  • assetImageWidth;
  • divisions;

# Added Feature

added trackHeight; added min; added max; added assetImageHeight; added assetImageWidth; added divisions;

import 'package:custom_slider/custom_slider.dart';

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

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

 // This widget is the root of your application.
 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     title: 'Custom Slider',
     theme: ThemeData(
       primarySwatch: Colors.blue,
     ),
     home: const Scaffold(
       body: Padding(
         padding: EdgeInsets.all(50.0),
         child: CustomSlider(
           assetImage: 'assets/slider_icon.png',
           inActiveTrackColor: Colors.pink,
           linearGradient: LinearGradient(colors: [Colors.pink, Colors.white]),
           trackHeight: 20.0,
           max: 100.0,
           min: 0.0,
           assetImageHeight: 40,
           assetImageWidth: 60,
         ),
       ),
     ),
   );
 }
}

Subscribe my youtube Channel "Ridz Creations"

https://www.youtube.com/channel/UCoXamjItgSKtu1j61EB04cg

custom_slider's People

Contributors

mohammadrijwan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.