mirror of
https://github.com/immich-app/immich.git
synced 2026-02-22 03:00:24 -05:00
* 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>
60 lines
1.6 KiB
Dart
60 lines
1.6 KiB
Dart
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),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|