Keep web Material styling and preserve visible installer access URLs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import '../ui/adaptive/platform.dart';
|
||||
import '../ui/theme/app_theme.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../shell/adaptive_shell.dart';
|
||||
@@ -79,7 +79,5 @@ class MyApp extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
bool get _platformIsCupertino =>
|
||||
defaultTargetPlatform == TargetPlatform.iOS ||
|
||||
defaultTargetPlatform == TargetPlatform.macOS;
|
||||
bool get _platformIsCupertino => prefersCupertino();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import '../ui/adaptive/platform.dart';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
@@ -551,7 +552,5 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
AppDestination.settings => AppRoute.settings,
|
||||
};
|
||||
|
||||
bool get _platformIsCupertino =>
|
||||
defaultTargetPlatform == TargetPlatform.iOS ||
|
||||
defaultTargetPlatform == TargetPlatform.macOS;
|
||||
bool get _platformIsCupertino => prefersCupertino();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import '../ui/adaptive/platform.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -243,9 +244,7 @@ class _PipelinesRootState extends State<PipelinesRoot> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
bool get _cupertino =>
|
||||
defaultTargetPlatform == TargetPlatform.iOS ||
|
||||
defaultTargetPlatform == TargetPlatform.macOS;
|
||||
bool get _cupertino => prefersCupertino();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../ui/adaptive/host.dart';
|
||||
@@ -9,7 +8,8 @@ import '../pipeline_query.dart';
|
||||
/// The one platform decision for this feature. The screen itself receives no
|
||||
/// platform flag, so tests and integration obey Flutter's target platform.
|
||||
bool useCupertinoControls(BuildContext context) =>
|
||||
usesCupertinoHost(context) || defaultTargetPlatform == TargetPlatform.iOS;
|
||||
usesCupertinoHost(context) ||
|
||||
Theme.of(context).platform == TargetPlatform.iOS;
|
||||
|
||||
/// Standard platform activity indicator with an accessible status label.
|
||||
class PipelineProgress extends StatelessWidget {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
/// Browsers use Material consistently, regardless of their host OS.
|
||||
bool prefersCupertino({bool web = kIsWeb, TargetPlatform? platform}) {
|
||||
final target = platform ?? defaultTargetPlatform;
|
||||
return !web &&
|
||||
(target == TargetPlatform.iOS || target == TargetPlatform.macOS);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -26,6 +27,7 @@ abstract final class AppColors {
|
||||
const _seed = Color(0xFF6750A4);
|
||||
|
||||
ThemeData appLightTheme() => ThemeData(
|
||||
platform: kIsWeb ? TargetPlatform.android : null,
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: _seed),
|
||||
pageTransitionsTheme: appPageTransitions,
|
||||
);
|
||||
@@ -94,6 +96,7 @@ ThemeData appDarkTheme() {
|
||||
surfaceContainerHighest: const Color(0xFF303136),
|
||||
);
|
||||
return ThemeData(
|
||||
platform: kIsWeb ? TargetPlatform.android : null,
|
||||
colorScheme: scheme,
|
||||
scaffoldBackgroundColor: scheme.surface,
|
||||
pageTransitionsTheme: appPageTransitions,
|
||||
|
||||
Reference in New Issue
Block a user