Compare commits

...

3 commits

Author SHA1 Message Date
Ian VanSchooten
db1f162f1e
Fetch more commits for Sentry releases (#209) 2024-12-18 16:28:28 -05:00
Ian VanSchooten
afc3abd633
Set ConfigItem label text style correctly (#208)
* Set ConfigItem label text style correctly

* Add right padding for chevrons
2024-12-18 16:12:24 -05:00
Ian VanSchooten
a449a650c3
Fix deep links (#207) 2024-12-18 10:26:46 -05:00
4 changed files with 45 additions and 41 deletions

View file

@ -15,6 +15,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
show-progress: false show-progress: false
fetch-depth: 25 # For sentry releases
- name: Set up Go 1.22 - name: Set up Go 1.22
uses: actions/setup-go@v5 uses: actions/setup-go@v5

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mobile_nebula/services/utils.dart'; import 'package:mobile_nebula/services/utils.dart';
@ -25,7 +27,12 @@ class ConfigItem extends StatelessWidget {
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment, crossAxisAlignment: crossAxisAlignment,
children: <Widget>[ children: <Widget>[
Container(width: labelWidth, child: label), Container(
width: labelWidth,
child: Platform.isAndroid
? label
: DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle, child: Container(child: label))),
Expanded(child: content), Expanded(child: content),
], ],
)); ));

View file

@ -45,7 +45,7 @@ class ConfigPageItem extends StatelessWidget {
onPressed: this.disabled ? null : onPressed, onPressed: this.disabled ? null : onPressed,
color: Utils.configItemBackground(context), color: Utils.configItemBackground(context),
child: Container( child: Container(
padding: EdgeInsets.only(left: 15), padding: EdgeInsets.only(left: 15, right: 15),
constraints: BoxConstraints(minHeight: Utils.minInteractiveSize, minWidth: double.infinity), constraints: BoxConstraints(minHeight: Utils.minInteractiveSize, minWidth: double.infinity),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment, crossAxisAlignment: crossAxisAlignment,

View file

@ -94,46 +94,42 @@ class _AppState extends State<App> {
), ),
); );
return MaterialApp( return PlatformProvider(
theme: brightness == Brightness.light ? lightTheme : darkTheme, settings: PlatformSettingsData(iosUsesMaterialWidgets: true),
home: Scaffold( builder: (context) => PlatformApp(
body: PlatformProvider( debugShowCheckedModeBanner: false,
//initialPlatform: initialPlatform, localizationsDelegates: <LocalizationsDelegate<dynamic>>[
builder: (context) => PlatformApp( DefaultMaterialLocalizations.delegate,
debugShowCheckedModeBanner: false, DefaultWidgetsLocalizations.delegate,
localizationsDelegates: <LocalizationsDelegate<dynamic>>[ DefaultCupertinoLocalizations.delegate,
DefaultMaterialLocalizations.delegate, ],
DefaultWidgetsLocalizations.delegate, title: 'Nebula',
DefaultCupertinoLocalizations.delegate, material: (_, __) {
], return new MaterialAppData(
title: 'Nebula', themeMode: brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark,
material: (_, __) { theme: brightness == Brightness.light ? lightTheme : darkTheme,
return new MaterialAppData( );
themeMode: brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark, },
); cupertino: (_, __) => CupertinoAppData(
}, theme: CupertinoThemeData(brightness: brightness),
cupertino: (_, __) => CupertinoAppData(
theme: CupertinoThemeData(brightness: brightness),
),
onGenerateRoute: (settings) {
if (settings.name == '/') {
return platformPageRoute(context: context, builder: (context) => MainScreen(this.dnEnrolled));
}
final uri = Uri.parse(settings.name!);
if (uri.path == EnrollmentScreen.routeName) {
// TODO: maybe implement this as a dialog instead of a page, you can stack multiple enrollment screens which is annoying in dev
return platformPageRoute(
context: context,
builder: (context) =>
EnrollmentScreen(code: EnrollmentScreen.parseCode(settings.name!), stream: this.dnEnrolled),
);
}
return null;
},
),
), ),
onGenerateRoute: (settings) {
if (settings.name == '/') {
return platformPageRoute(context: context, builder: (context) => MainScreen(this.dnEnrolled));
}
final uri = Uri.parse(settings.name!);
if (uri.path == EnrollmentScreen.routeName) {
// TODO: maybe implement this as a dialog instead of a page, you can stack multiple enrollment screens which is annoying in dev
return platformPageRoute(
context: context,
builder: (context) =>
EnrollmentScreen(code: EnrollmentScreen.parseCode(settings.name!), stream: this.dnEnrolled),
);
}
return null;
},
), ),
); );
} }