Skip to content

Commit 4c1293c

Browse files
committed
fix: syntax error in nearby_list.dart
1 parent 219c35b commit 4c1293c

4 files changed

Lines changed: 61 additions & 36 deletions

File tree

lib/main.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ class HrOscApp extends StatelessWidget {
105105
child: child!,
106106
);
107107
},
108-
home: const HeartDashboard(),
108+
home: ScrollConfiguration(
109+
behavior: const ScrollBehavior().copyWith(scrollbars: false),
110+
child: const HeartDashboard(),
111+
),
109112
),
110113
);
111114
}

lib/theme/design_system.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart';
55
class AppColors {
66
// Backgrounds
77
static const bgPrimary = CupertinoDynamicColor.withBrightness(
8-
color: Color(0xFFF0F2F5), // Refined off-white
8+
color: Color(0xFFF2F2F7), // iOS System Gray 6
99
darkColor: Color(0xFF000000), // Pure black for OLED
1010
);
1111
static const bgSecondary = CupertinoDynamicColor.withBrightness(
@@ -66,6 +66,15 @@ class AppColors {
6666
);
6767
}
6868

69+
class AppShadows {
70+
static final card = BoxShadow(
71+
color: const Color(0x1F000000), // Black with ~12% opacity
72+
offset: const Offset(0, 4),
73+
blurRadius: 12,
74+
spreadRadius: 0,
75+
);
76+
}
77+
6978
// --- Typography (San Francisco -ish) ---
7079
class AppTypography {
7180
static const largeTitle = TextStyle(

lib/widgets/glass_surface.dart

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,31 @@ class GlassSurface extends StatelessWidget {
2525
? CupertinoColors.black.withValues(alpha: bgOpacity)
2626
: CupertinoColors.white.withValues(alpha: bgOpacity);
2727

28-
final content = ClipRRect(
29-
borderRadius: BorderRadius.circular(AppRadius.r20),
30-
child: BackdropFilter(
31-
filter: ImageFilter.blur(
32-
sigmaX: GlassStyle.blurAmount,
33-
sigmaY: GlassStyle.blurAmount
34-
),
35-
child: Container(
36-
padding: padding ?? const EdgeInsets.all(AppSpacing.cardPadding),
37-
decoration: BoxDecoration(
38-
color: bgColor,
39-
borderRadius: BorderRadius.circular(AppRadius.r20),
40-
border: Border.all(
41-
color: AppColors.glassBorder.resolveFrom(context),
42-
width: 0.5,
28+
final content = Container(
29+
decoration: BoxDecoration(
30+
boxShadow: [ AppShadows.card ],
31+
borderRadius: BorderRadius.circular(AppRadius.r20),
32+
),
33+
child: ClipRRect(
34+
borderRadius: BorderRadius.circular(AppRadius.r20),
35+
child: BackdropFilter(
36+
filter: ImageFilter.blur(
37+
sigmaX: GlassStyle.blurAmount,
38+
sigmaY: GlassStyle.blurAmount
39+
),
40+
child: Container(
41+
padding: padding ?? const EdgeInsets.all(AppSpacing.cardPadding),
42+
decoration: BoxDecoration(
43+
color: bgColor,
44+
// borderRadius handling is done by ClipRRect, but inner border needs it too
45+
borderRadius: BorderRadius.circular(AppRadius.r20),
46+
border: Border.all(
47+
color: AppColors.glassBorder.resolveFrom(context),
48+
width: 0.5,
49+
),
4350
),
51+
child: child,
4452
),
45-
child: child,
4653
),
4754
),
4855
);

lib/widgets/nearby_list.dart

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,31 @@ class NearbyList extends StatelessWidget {
8585
return Column(
8686
children: [
8787
header,
88-
ClipRRect(
89-
borderRadius: BorderRadius.circular(AppRadius.r12),
90-
child: Container(
91-
color: AppColors.bgSecondary.resolveFrom(context),
92-
child: Column(
93-
children: [
94-
for (var i = 0; i < devices.length; i++) ...[
95-
if (i > 0)
96-
Container(
97-
height: 0.5,
98-
margin: const EdgeInsetsDirectional.only(start: 56),
99-
color: AppColors.separator.resolveFrom(context)
100-
),
101-
_DeviceTile(
102-
device: devices[i],
103-
mgr: mgr,
104-
),
88+
Container(
89+
decoration: BoxDecoration(
90+
borderRadius: BorderRadius.circular(AppRadius.r12),
91+
boxShadow: [ AppShadows.card ],
92+
),
93+
child: ClipRRect(
94+
borderRadius: BorderRadius.circular(AppRadius.r12),
95+
child: Container(
96+
color: AppColors.bgSecondary.resolveFrom(context),
97+
child: Column(
98+
children: [
99+
for (var i = 0; i < devices.length; i++) ...[
100+
if (i > 0)
101+
Container(
102+
height: 0.5,
103+
margin: const EdgeInsetsDirectional.only(start: 56),
104+
color: AppColors.separator.resolveFrom(context)
105+
),
106+
_DeviceTile(
107+
device: devices[i],
108+
mgr: mgr,
109+
),
110+
],
105111
],
106-
],
112+
),
107113
),
108114
),
109115
),

0 commit comments

Comments
 (0)