mirror of
https://github.com/immich-app/immich.git
synced 2026-03-04 09:57:33 +03:00
feat(mobile): html text (#25739)
* feat: html text * feat: mobile ui showcase (#25827) * feat: mobile ui showcase * remove showcase from main app * update fonts * update code to be loaded from asset * fix ci --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> # Conflicts: # mobile/lib/widgets/common/immich_sliver_app_bar.dart --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
59
mobile/packages/ui/showcase/lib/widgets/shell_layout.dart
Normal file
59
mobile/packages/ui/showcase/lib/widgets/shell_layout.dart
Normal file
@@ -0,0 +1,59 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:showcase/constants.dart';
|
||||
import 'package:showcase/widgets/sidebar_navigation.dart';
|
||||
|
||||
class ShellLayout extends StatelessWidget {
|
||||
final Widget child;
|
||||
final VoidCallback onThemeToggle;
|
||||
|
||||
const ShellLayout({
|
||||
super.key,
|
||||
required this.child,
|
||||
required this.onThemeToggle,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Image.asset('assets/immich_logo.png', height: 32, width: 32),
|
||||
const SizedBox(width: 8),
|
||||
Image.asset(
|
||||
isDark
|
||||
? 'assets/immich-text-dark.png'
|
||||
: 'assets/immich-text-light.png',
|
||||
height: 24,
|
||||
filterQuality: FilterQuality.none,
|
||||
isAntiAlias: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
isDark ? Icons.light_mode_outlined : Icons.dark_mode_outlined,
|
||||
size: LayoutConstants.iconSizeLarge,
|
||||
),
|
||||
onPressed: onThemeToggle,
|
||||
tooltip: 'Toggle theme',
|
||||
),
|
||||
],
|
||||
shape: Border(
|
||||
bottom: BorderSide(color: Theme.of(context).dividerColor, width: 1),
|
||||
),
|
||||
),
|
||||
body: Row(
|
||||
children: [
|
||||
const SidebarNavigation(),
|
||||
const VerticalDivider(),
|
||||
Expanded(child: child),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user