sliding_widget 0.0.5 copy "sliding_widget: ^0.0.5" to clipboard
sliding_widget: ^0.0.5 copied to clipboard

A sliding Flutter widget, which helps to start an event based on user interaction. Highly customizable and flexible.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Center(
              child: SlidingWidget(
                width: 350,
                height: 60,
                backgroundColor: Colors.blue,
                foregroundColor: Colors.white,
                iconColor: Colors.blue,
                label: 'Slide to proceed',
                shadow: const BoxShadow(color: Colors.transparent),
                action: () {},
                child: const Icon(Icons.arrow_forward_ios),
              ),
            )
          ],
        ),
      ),
    );
  }
}
8
likes
160
pub points
59%
popularity
screenshot

Publisher

verified publishercooltechie.info

A sliding Flutter widget, which helps to start an event based on user interaction. Highly customizable and flexible.

Repository (GitHub)
View/report issues

Topics

#slide-widget #slide-button #slide-to #sliding-widget

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on sliding_widget