performance_indicator 0.0.1 copy "performance_indicator: ^0.0.1" to clipboard
performance_indicator: ^0.0.1 copied to clipboard

outdated

checks internet speed and gives opportunity to change quality of downloaded content

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    /// Performance indicator has also further functions.
    ///
    /// You can start current speed check anytime.
    /// This will influence the color of performance indicator pulsing button.
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
      await PerformanceIndicator.checkCurrentSpeed(
        badResponseTime: 500,
        url: 'https://google.com',
      );
    });

    final theme = ThemeData(
      brightness: Brightness.dark,
    );

    return MaterialApp(
      title: 'Example for performance indicator',
      home: Center(
        ///Performance indicator can be used placed everywhere
        ///as e.g. an already defined with quality dialog options.
        child: PerformanceIndicator.quality(
          width: 100.0,
          checkUri: Uri(host: 'google.com', scheme: 'https'),
          badResponseTimeInMs: 150,
        ),
      ),
      themeMode: ThemeMode.dark,
      theme: theme,
      color: Colors.black,
    );
  }
}
0
likes
0
points
14
downloads

Publisher

verified publisherilja-lichtenberg.com

Weekly Downloads

checks internet speed and gives opportunity to change quality of downloaded content

Homepage

License

unknown (license)

Dependencies

cron, flutter, flutter_staggered_grid_view, hive_flutter, hive_generator, http, material_design_icons_flutter

More

Packages that depend on performance_indicator