Skip to content

Commit 3c6eb2a

Browse files
authored
Merge pull request #166 from anusii/tony/163_consistent_light_theme_icon
Tony/163 consistent light theme mode
2 parents c661dbd + 0f47a1a commit 3c6eb2a

25 files changed

Lines changed: 930 additions & 1168 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ au](https://solidcommunity.au/docs/solidui)
1515

1616
## 0.1.0 First Release
1717

18+
+ Simplified light/dark theme management [0.0.24 20260116 tonypioneer]
1819
+ Support custom folder structure [0.0.24 20260114 anusavid]
1920
+ Default keyboard focus on LOGIN #160 [0.0.23 20260113 tonypioneer]
2021
+ Updated solidpod dependency - writePod() #155 [0.0.22 20260113 dc]

example/assets/images/app_icon.jpg

-19 KB
Binary file not shown.

example/assets/images/app_icon.png

57.3 KB
Loading

example/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class App extends StatelessWidget {
5555

5656
home: const SolidLogin(
5757
image: AssetImage('assets/images/app_image.jpg'),
58-
logo: AssetImage('assets/images/app_icon.jpg'),
58+
logo: AssetImage('assets/images/app_icon.png'),
5959
customFolderPathList: [
6060
'customDir1',
6161
'customDir2',

example/lib/app_scaffold.dart

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import 'package:solidui/solidui.dart';
3434

3535
import 'constants/app.dart';
3636
import 'home.dart';
37-
import 'screens/settings_page.dart';
37+
import 'screens/sample_page.dart';
3838

3939
final _scaffoldController = SolidScaffoldController();
4040

@@ -73,18 +73,6 @@ class AppScaffold extends StatelessWidget {
7373
''',
7474
child: SolidFile(),
7575
),
76-
SolidMenuItem(
77-
icon: Icons.info,
78-
title: 'About',
79-
tooltip: '''
80-
81-
**About:** Tap here to learn more about this application.
82-
83-
''',
84-
child: Center(
85-
child: Text('About Page', style: TextStyle(fontSize: 24)),
86-
),
87-
),
8876
],
8977

9078
// APP BAR.
@@ -105,18 +93,18 @@ class AppScaffold extends StatelessWidget {
10593

10694
actions: [
10795
SolidAppBarAction(
108-
icon: Icons.folder_open,
96+
icon: Icons.folder,
10997
onPressed: () => _scaffoldController.navigateToSubpage(
11098
const SolidFile(),
11199
),
112100
tooltip: 'Files',
113101
),
114102
SolidAppBarAction(
115-
icon: Icons.settings,
103+
icon: Icons.article,
116104
onPressed: () => _scaffoldController.navigateToSubpage(
117-
const SettingsPage(),
105+
const SamplePage(),
118106
),
119-
tooltip: 'Settings',
107+
tooltip: 'Sample Page',
120108
),
121109
],
122110
),
@@ -134,7 +122,7 @@ class AppScaffold extends StatelessWidget {
134122
aboutConfig: SolidAboutConfig(
135123
applicationName: appTitle.split(' - ')[0],
136124
applicationIcon: Image.asset(
137-
'assets/images/app_icon.jpg',
125+
'assets/images/app_icon.png',
138126
width: 64,
139127
height: 64,
140128
),
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/// Sample page - Demonstrates AppBar-only navigation pattern.
2+
///
3+
/// Copyright (C) 2026, Software Innovation Institute, ANU.
4+
///
5+
/// Licensed under the MIT License (the "License").
6+
///
7+
/// License: https://choosealicense.com/licenses/mit/.
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
//
16+
// The above copyright notice and this permission notice shall be included in
17+
// all copies or substantial portions of the Software.
18+
//
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
// SOFTWARE.
26+
///
27+
/// Authors: Tony Chen
28+
29+
library;
30+
31+
import 'package:flutter/material.dart';
32+
33+
/// Sample page widget demonstrating AppBar-only navigation.
34+
35+
class SamplePage extends StatelessWidget {
36+
const SamplePage({super.key});
37+
38+
@override
39+
Widget build(BuildContext context) {
40+
final theme = Theme.of(context);
41+
42+
return Center(
43+
child: Card(
44+
margin: const EdgeInsets.all(32.0),
45+
child: Padding(
46+
padding: const EdgeInsets.all(32.0),
47+
child: Column(
48+
mainAxisSize: MainAxisSize.min,
49+
children: [
50+
Icon(
51+
Icons.article_outlined,
52+
size: 64,
53+
color: theme.colorScheme.primary,
54+
),
55+
const SizedBox(height: 24),
56+
Text(
57+
'Sample Page',
58+
style: theme.textTheme.headlineMedium?.copyWith(
59+
fontWeight: FontWeight.bold,
60+
),
61+
),
62+
const SizedBox(height: 16),
63+
Text(
64+
'AppBar-Only Navigation Demo',
65+
style: theme.textTheme.titleMedium?.copyWith(
66+
color: theme.colorScheme.primary,
67+
),
68+
),
69+
const SizedBox(height: 32),
70+
Container(
71+
constraints: const BoxConstraints(maxWidth: 500),
72+
child: Text(
73+
'The navigation buttons for this page are only placed on '
74+
'the app bar, so no buttons on the navigation rail will be '
75+
'highlighted when entering this page. In contrast, when '
76+
'the Files button on the app bar is clicked, the '
77+
'Files button on the navigation rail will be highlighted '
78+
'as well, since it is laid out in both places. This button '
79+
'also demonstrates the usage of the navigateToSubpage() '
80+
'function.',
81+
style: theme.textTheme.bodyLarge,
82+
textAlign: TextAlign.left,
83+
),
84+
),
85+
],
86+
),
87+
),
88+
),
89+
);
90+
}
91+
}

example/lib/screens/settings_page.dart

Lines changed: 0 additions & 224 deletions
This file was deleted.

0 commit comments

Comments
 (0)