Skip to content

Commit 3fec252

Browse files
committed
.
1 parent 29daa00 commit 3fec252

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class MyApp extends StatelessWidget {
7676
cardColor: const Color.fromARGB(255, 43, 43, 43),
7777
visualDensity: VisualDensity.standard,
7878
focusTheme: FocusThemeData(
79-
glowFactor: is10footScreen() ? 2.0 : 0.0,
79+
glowFactor: is10footScreen(context) ? 2.0 : 0.0,
8080
),
8181
),
8282
theme: FluentThemeData(
@@ -85,7 +85,7 @@ class MyApp extends StatelessWidget {
8585
scaffoldBackgroundColor: const Color.fromRGBO(243, 243, 243, 100),
8686
cardColor: const Color.fromARGB(255, 251, 251, 251),
8787
focusTheme: FocusThemeData(
88-
glowFactor: is10footScreen() ? 2.0 : 0.0,
88+
glowFactor: is10footScreen(context) ? 2.0 : 0.0,
8989
),
9090
),
9191
home: isSupported ? const HomePage() : const UnsupportedError(),

lib/screens/pages/miscellaneous_page.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,8 @@ class _MiscellaneousPageState extends State<MiscellaneousPage> {
200200
),
201201
CardHighlightSwitch(
202202
icon: msicons.FluentIcons.battery_checkmark_20_regular,
203-
label: "Battery Health Reporting",
204-
codeSnippet:
205-
"Reports Battery health status; Enabling will increase system usage",
203+
label: ReviLocalizations.of(context).miscBHRLabel,
204+
description: ReviLocalizations.of(context).miscBHRDescription,
206205
switchBool: _bhrBool,
207206
function: (value) async {
208207
setState(() {

lib/widgets/card_highlight.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: prefer_final_fields, unused_field
2+
13
import 'dart:math';
24

35
import 'package:fluent_ui/fluent_ui.dart';
@@ -189,10 +191,10 @@ class CardHighlight extends StatefulWidget {
189191

190192
class _CardHighlightState extends State<CardHighlight>
191193
with AutomaticKeepAliveClientMixin<CardHighlight> {
192-
bool _isOpen = false;
193-
bool _isCopying = false;
194+
static bool _isOpen = false;
195+
static bool _isCopying = false;
194196

195-
final key = Random().nextInt(1000);
197+
final _key = Random().nextInt(1000);
196198

197199
@override
198200
Widget build(BuildContext context) {
@@ -248,7 +250,7 @@ class _CardHighlightState extends State<CardHighlight>
248250
: cardBorderColorForLight,
249251
backgroundColor: Colors.transparent,
250252
child: Expander(
251-
key: PageStorageKey(key),
253+
key: PageStorageKey(_key),
252254
headerShape: (open) =>
253255
const RoundedRectangleBorder(borderRadius: cardBorderRadius),
254256
onStateChanged: (state) {

0 commit comments

Comments
 (0)