mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-04 13:50:17 +00:00
Added progress indicator top items
This commit is contained in:
parent
53113735c8
commit
bbf4041002
4 changed files with 36 additions and 5 deletions
|
@ -38,6 +38,7 @@ This is an unofficial application. The AdGuard Home team and the development of
|
|||
- [flutter web browser](https://pub.dev/packages/flutter_web_browser)
|
||||
- [flutter svg](https://pub.dev/packages/flutter_svg)
|
||||
- [bottom sheet](https://pub.dev/packages/bottom_sheet)
|
||||
- [percent indicator](https://pub.dev/packages/percent_indicator)
|
||||
|
||||
<br>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:percent_indicator/percent_indicator.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
@ -154,12 +155,33 @@ class _TopItemsScreenState extends State<TopItemsScreen> {
|
|||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
Text(
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 50,
|
||||
child: Text(
|
||||
"${doubleFormat((screenData[index].values.toList()[0]/total*100), Platform.localeName)}%",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Flexible(
|
||||
child: LinearPercentIndicator(
|
||||
animation: true,
|
||||
lineHeight: 4,
|
||||
animationDuration: 500,
|
||||
curve: Curves.easeOut,
|
||||
percent: screenData[index].values.toList()[0]/total,
|
||||
barRadius: const Radius.circular(5),
|
||||
progressColor: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).primaryColor.withOpacity(0.15),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
|
|
|
@ -406,6 +406,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
percent_indicator:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: percent_indicator
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.2"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -48,6 +48,7 @@ dependencies:
|
|||
flutter_web_browser: ^0.17.1
|
||||
flutter_svg: ^1.1.5
|
||||
bottom_sheet: ^3.1.2
|
||||
percent_indicator: ^4.2.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue