realtime_battery_indicator 1.0.0 copy "realtime_battery_indicator: ^1.0.0" to clipboard
realtime_battery_indicator: ^1.0.0 copied to clipboard

A realtime good looking customizable battery indicator for all platforms.

example/lib/main.dart

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

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

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

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

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

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Column(
        children: [
          SizedBox(height: 20),
          Text(
            'Realtime Battery Indicator',
            style: TextStyle(
              fontSize: 20,
              fontWeight: FontWeight.bold,
            ),
          ),
          SizedBox(height: 180),
          Text(
            'With Battery Level',
            style: TextStyle(
              fontSize: 20,
              fontWeight: FontWeight.bold,
            ),
          ),
          SizedBox(height: 10),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              BatteryIndicator(),
            ],
          ),
          SizedBox(height: 20),
          Text(
            'Without Battery Level',
            style: TextStyle(
              fontSize: 20,
              fontWeight: FontWeight.bold,
            ),
          ),
          SizedBox(height: 10),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              BatteryIndicator(
                showBatteryLevel: false,
              ),
            ],
          ),
        ],
      ),
    );
  }
}
2
likes
0
pub points
30%
popularity

Publisher

verified publishermantreshkhurana.com

A realtime good looking customizable battery indicator for all platforms.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

battery_plus, flutter

More

Packages that depend on realtime_battery_indicator