1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// SPDX-License-Identifier: Apache-2.0
import 'package:dashboard_app/size.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/material.dart';
class ChildLockStatus extends StatelessWidget {
bool isChildLockActiveLeft;
bool isChildLockActiveRight;
ChildLockStatus(
{Key? key,
required this.isChildLockActiveLeft,
required this.isChildLockActiveRight})
: super(key: key);
@override
Widget build(BuildContext context) {
return isChildLockActiveLeft && isChildLockActiveRight
? Column(
children: [
Text(
"Child Lock",
style: TextStyle(
fontSize: SizeConfig.fontsize / 3, color: Colors.green),
),
Text(
"Activated",
style: TextStyle(
fontSize: SizeConfig.fontsize / 3, color: Colors.green),
),
SizedBox(
width: SizeConfig.safeBlockVertical / 2,
),
Icon(
Icons.lock,
size: SizeConfig.fontsize / 3,
color: Colors.green,
),
],
)
: Column(
children: [
Text(
'No child Lock',
style: TextStyle(
fontSize: SizeConfig.fontsize / 2,
color: Colors.redAccent,
),
),
SizedBox(
height: SizeConfig.safeBlockVertical / 2,
),
Icon(
Icons.lock_open_outlined,
size: SizeConfig.fontsize / 4,
color: Colors.red,
),
],
);
}
}
|