w8ly 0.0.4 copy "w8ly: ^0.0.4" to clipboard
w8ly: ^0.0.4 copied to clipboard

A beautiful customizable horizontal weight picker for Flutter

example/lib/main.dart

import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:w8ly/w8ly.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true, brightness: Brightness.light),
      home: const DemoScreen(),
    );
  }
}

class DemoScreen extends StatelessWidget {
  const DemoScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xFFF6F7FB),
      body: SafeArea(
        child: Column(
          children: [
            const SizedBox(height: 30),
            const Text(
              "W8ly Weight Picker",
              style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 8),
            const Text(
              "Smooth, customizable & production-ready Flutter widget",
              textAlign: TextAlign.center,
              style: TextStyle(fontSize: 14, color: Colors.grey),
            ),
            const SizedBox(height: 40),
            Expanded(
              child: Center(
                child: W8lyWeightPicker(
                  initialWeight: 31,
                  minWeight: 30,
                  maxWeight: 120,
                  unit: 'kg',

                  activeColor: Colors.blue,
                  inactiveColor: Colors.grey,

                  selectedTextStyle: const TextStyle(
                    fontSize: 32,
                    fontWeight: FontWeight.bold,
                    color: Colors.black,
                  ),

                  labelTextStyle: const TextStyle(
                    fontSize: 14,
                    fontWeight: FontWeight.w500,
                    color: Colors.black54,
                  ),
                  onChanged: (weight) {
                    log('Selected weight: $weight kg');
                  },
                ),
              ),
            ),

            const Padding(
              padding: EdgeInsets.only(bottom: 20),
              child: Text(
                "Drag to select weight",
                style: TextStyle(fontSize: 13, color: Colors.grey),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
160
points
66
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A beautiful customizable horizontal weight picker for Flutter

Repository (GitHub)
View/report issues

Topics

#flutter #weight-picker #ruler-picker #fitness #health

License

MIT (license)

Dependencies

flutter

More

Packages that depend on w8ly