mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-05 04:40:37 +00:00
Fixed issue validation encryption keys
This commit is contained in:
parent
121af9caaa
commit
fb74be3e69
6 changed files with 132 additions and 11 deletions
45
lib/screens/settings/encryption/status.dart
Normal file
45
lib/screens/settings/encryption/status.dart
Normal file
|
@ -0,0 +1,45 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||
|
||||
class Status extends StatelessWidget {
|
||||
final bool valid;
|
||||
final String label;
|
||||
|
||||
const Status({
|
||||
Key? key,
|
||||
required this.valid,
|
||||
required this.label
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appConfigProvider = Provider.of<AppConfigProvider>(context);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: valid == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
: Colors.red
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
Flexible(child: Text(label))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue