brightness_pro 0.0.2 copy "brightness_pro: ^0.0.2" to clipboard
brightness_pro: ^0.0.2 copied to clipboard

outdated

This package allows you to adjust the screen brightness using drag and slider functionalities. It provides precise control over the screen brightness, allowing you to tailor it to your specific needs [...]

example/lib/main.dart

import 'package:brightness_pro/brightness_pro_drag.dart';
import 'package:brightness_pro/brightness_pro_slider.dart';
import 'package:flutter/material.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      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: SingleChildScrollView(
          child: SizedBox(
            width: MediaQuery.of(context).size.width,
            height: MediaQuery.of(context).size.height,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                BrightnessProSlider(),
                const SizedBox(
                  height: 30,
                ),
                BrightnessProSlider(
                  display: Display.HORIZONTAL,
                ),
                const SizedBox(
                  height: 30,
                ),
                Container(
                    color: Colors.deepOrange,
                    width: 50,
                    height: 250,
                    child: const BrightnessProDragDirection())
              ],
            ),
          ),
        ) // This trailing comma makes auto-formatting nicer for build methods.
        );
  }
}
5
likes
0
points
25
downloads

Publisher

verified publisherswanflutterdev.com

Weekly Downloads

This package allows you to adjust the screen brightness using drag and slider functionalities. It provides precise control over the screen brightness, allowing you to tailor it to your specific needs and preferences. With this package, you can set the screen brightness to a maximum of 100 units. This capability enables you to finely adjust the screen brightness and make the most of it according to your requirements.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, screen_brightness

More

Packages that depend on brightness_pro