batterylevelbar 0.0.6
batterylevelbar: ^0.0.6 copied to clipboard

Create different types beautiful battery indicator.

batterylevelbar #

Create different types beautiful battery indicator.

Getting Started #

To use this plugin, add 'batterylevelbar' in your pubspec.yaml file.

Example
Set your battery style, level, shape and charging mode view specification.

Example #


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

void main() => runApp(MyApp());  
  
class MyApp extends StatelessWidget {  
  @override  
  Widget build(BuildContext context) {  
    return MaterialApp(  
      title: 'Battery Bar Demo',  
      theme: ThemeData(  
        primarySwatch: Colors.blue,  
      ),  
      home: BatteryBarDemo(),  
    );  
  }  
}  
  
class BatteryBarDemo extends StatelessWidget {  
  @override  
  Widget build(BuildContext context) {  
    return Scaffold(  
      body: Center(  
        child: Container(
                width: 300,
                height: 300,
                alignment: Alignment.topLeft,
                color: Colors.transparent,
                  child: CustomPaint(
                    painter: Battery_Level_Painter(
                      x: 200,
                      y: 50,
                      lvl: 8,
                      Style: BatteryIndicatorStyle.sensetive,
                      Thickness: BorderThickness.medium ,
                      chargingMod: false,
                    ),
                  ),
                
       ),
      ),  
    );  
  }  
}  
15
likes
70
pub points
45%
popularity

Publisher

ivmes.com

Create different types beautiful battery indicator.

Homepage

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on batterylevelbar