Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
melo936 committed May 11, 2023
1 parent 29daa00 commit 3fec252
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class MyApp extends StatelessWidget {
cardColor: const Color.fromARGB(255, 43, 43, 43),
visualDensity: VisualDensity.standard,
focusTheme: FocusThemeData(
glowFactor: is10footScreen() ? 2.0 : 0.0,
glowFactor: is10footScreen(context) ? 2.0 : 0.0,
),
),
theme: FluentThemeData(
Expand All @@ -85,7 +85,7 @@ class MyApp extends StatelessWidget {
scaffoldBackgroundColor: const Color.fromRGBO(243, 243, 243, 100),
cardColor: const Color.fromARGB(255, 251, 251, 251),
focusTheme: FocusThemeData(
glowFactor: is10footScreen() ? 2.0 : 0.0,
glowFactor: is10footScreen(context) ? 2.0 : 0.0,
),
),
home: isSupported ? const HomePage() : const UnsupportedError(),
Expand Down
5 changes: 2 additions & 3 deletions lib/screens/pages/miscellaneous_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ class _MiscellaneousPageState extends State<MiscellaneousPage> {
),
CardHighlightSwitch(
icon: msicons.FluentIcons.battery_checkmark_20_regular,
label: "Battery Health Reporting",
codeSnippet:
"Reports Battery health status; Enabling will increase system usage",
label: ReviLocalizations.of(context).miscBHRLabel,
description: ReviLocalizations.of(context).miscBHRDescription,
switchBool: _bhrBool,
function: (value) async {
setState(() {
Expand Down
10 changes: 6 additions & 4 deletions lib/widgets/card_highlight.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: prefer_final_fields, unused_field

import 'dart:math';

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

class _CardHighlightState extends State<CardHighlight>
with AutomaticKeepAliveClientMixin<CardHighlight> {
bool _isOpen = false;
bool _isCopying = false;
static bool _isOpen = false;
static bool _isCopying = false;

final key = Random().nextInt(1000);
final _key = Random().nextInt(1000);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -248,7 +250,7 @@ class _CardHighlightState extends State<CardHighlight>
: cardBorderColorForLight,
backgroundColor: Colors.transparent,
child: Expander(
key: PageStorageKey(key),
key: PageStorageKey(_key),
headerShape: (open) =>
const RoundedRectangleBorder(borderRadius: cardBorderRadius),
onStateChanged: (state) {
Expand Down

0 comments on commit 3fec252

Please sign in to comment.