[imp]: add florid icon on appbar

This commit is contained in:
nahnah
2026-02-14 16:58:11 +00:00
parent 2aca99595e
commit 4b115acf14
6 changed files with 119 additions and 32 deletions
+4
View File
@@ -0,0 +1,4 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M260.687 238.569C264.312 249.069 268.687 256.975 273.812 262.287C278.937 267.6 286.812 272.069 297.437 275.694C296.937 269.694 295.812 264.412 294.062 259.85C292.312 255.287 290.062 251.631 287.312 248.881C285.187 246.756 283.156 245.1 281.219 243.912C279.281 242.725 277.25 241.756 275.125 241.006C273 240.256 270.75 239.725 268.375 239.412C266 239.1 263.437 238.819 260.687 238.569ZM251.312 238.569C239.187 239.694 230.25 243.131 224.5 248.881C218.75 254.631 215.312 263.569 214.187 275.694C219.562 273.819 224.25 271.756 228.25 269.506C232.25 267.256 235.5 264.881 238 262.381C239.875 260.506 241.469 258.662 242.781 256.85C244.094 255.037 245.25 253.194 246.25 251.319C247.25 249.444 248.125 247.475 248.875 245.412C249.625 243.35 250.437 241.069 251.312 238.569ZM256 306.631C246.625 306.631 238.656 309.912 232.094 316.475C225.531 323.037 222.25 331.006 222.25 340.381L222.25 357.444L238.562 343.569L256 364.569L273.437 343.569L289.75 357.444L289.75 340.381C289.75 331.006 286.469 323.037 279.906 316.475C273.344 309.912 265.375 306.631 256 306.631ZM263.5 227.881C276 227.881 286.625 232.256 295.375 241.006C304.125 249.756 308.5 260.381 308.5 272.881L308.5 287.881C299.625 288.006 291.25 286.194 283.375 282.444C275.5 278.694 268.875 273.631 263.5 267.256L263.5 295.771C274.25 297.511 283.187 302.556 290.312 310.906C297.437 319.256 301 329.081 301 340.381L301 369.819C301 372.307 299.875 374.055 297.625 375.061C295.375 376.066 293.375 375.756 291.625 374.131L274.75 359.506L260.312 376.944C259.202 378.319 257.769 379.006 256.011 379.006C254.254 379.006 252.812 378.319 251.687 376.944L237.25 359.506L220.375 374.131C218.625 375.756 216.625 376.066 214.375 375.061C212.125 374.055 211 372.307 211 369.819L211 340.381C211 329.084 214.562 319.261 221.687 310.914C228.812 302.566 237.75 297.514 248.5 295.756L248.5 267.256C243.125 273.631 236.5 278.693 228.625 282.442C220.75 286.19 212.375 288.004 203.5 287.881L203.5 272.881C203.5 260.381 207.875 249.756 216.625 241.006C225.375 232.256 236 227.881 248.5 227.881L263.5 227.881Z" fill="black"/>
<path d="M173.5 227.717C174.5 214.467 178.562 202.186 185.687 190.874C192.812 179.561 202.25 170.592 214 163.967L199.937 139.78C199.562 138.655 199.531 137.53 199.844 136.405C200.156 135.28 200.812 134.405 201.812 133.78C202.937 133.155 204.156 133.03 205.469 133.405C206.781 133.78 207.75 134.53 208.375 135.655L222.25 159.467C233 154.842 244.25 152.53 256 152.53C267.75 152.53 279 154.842 289.75 159.467L303.812 135.655C304.437 134.53 305.406 133.78 306.719 133.405C308.031 133.03 309.25 133.155 310.375 133.78C311.375 134.405 312.094 135.311 312.531 136.499C312.969 137.686 312.875 138.78 312.25 139.78L298 163.967C309.75 170.592 319.187 179.561 326.312 190.874C333.437 202.186 337.5 214.467 338.5 227.717H173.5ZM218.5 207.092C221 207.092 223.187 206.155 225.062 204.28C226.937 202.405 227.875 200.217 227.875 197.717C227.875 195.217 226.937 193.03 225.062 191.155C223.187 189.28 221 188.342 218.5 188.342C216 188.342 213.812 189.28 211.937 191.155C210.062 193.03 209.125 195.217 209.125 197.717C209.125 200.217 210.062 202.405 211.937 204.28C213.812 206.155 216 207.092 218.5 207.092ZM293.5 207.092C296 207.092 298.187 206.155 300.062 204.28C301.937 202.405 302.875 200.217 302.875 197.717C302.875 195.217 301.937 193.03 300.062 191.155C298.187 189.28 296 188.342 293.5 188.342C291 188.342 288.812 189.28 286.937 191.155C285.062 193.03 284.125 195.217 284.125 197.717C284.125 200.217 285.062 202.405 286.937 204.28C288.812 206.155 291 207.092 293.5 207.092Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

+2
View File
@@ -5,6 +5,8 @@ var kAppColor = Color(0xFF74DAB6);
String kAppName = 'Florid';
const kAppPackageName = 'com.nahnah.florid';
const kAppLogoSvg = 'assets/Florid.svg';
const kAndroidSdkVersions = <int, String>{
14: 'Android 4.0',
15: 'Android 4.0.3',
+53 -23
View File
@@ -1,9 +1,14 @@
import 'dart:async';
import 'package:florid/constants.dart';
import 'package:florid/l10n/app_localizations.dart';
import 'package:florid/providers/settings_provider.dart';
import 'package:florid/screens/categories_screen.dart';
import 'package:florid/screens/home_screen.dart';
import 'package:florid/widgets/f_tabbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/svg.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:provider/provider.dart';
@@ -18,15 +23,24 @@ class _LibraryScreenState extends State<LibraryScreen>
with TickerProviderStateMixin {
final tabs = [HomeScreen(), CategoriesScreen()];
late TabController _tabController;
Timer? _titleSwitchTimer;
bool _showAppName = false;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
_titleSwitchTimer = Timer(const Duration(seconds: 3), () {
if (!mounted) return;
setState(() {
_showAppName = true;
});
});
}
@override
void dispose() {
_titleSwitchTimer?.cancel();
_tabController.dispose();
super.dispose();
}
@@ -39,8 +53,29 @@ class _LibraryScreenState extends State<LibraryScreen>
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) {
return [
SliverAppBar.medium(
title: Text(AppLocalizations.of(context)!.app_name),
SliverAppBar(
title: AnimatedSwitcher(
duration: const Duration(milliseconds: 250),
switchInCurve: Curves.easeOut,
switchOutCurve: Curves.easeIn,
transitionBuilder: (child, animation) {
return FadeTransition(opacity: animation, child: child);
},
child: _showAppName
? Text(
AppLocalizations.of(context)!.app_name,
key: const ValueKey('app_name'),
)
: SvgPicture.asset(
kAppLogoSvg,
key: const ValueKey('app_logo'),
height: 56,
colorFilter: ColorFilter.mode(
Theme.of(context).colorScheme.primary,
BlendMode.srcIn,
),
).animate().fadeIn(duration: 500.ms, delay: 100.ms),
),
backgroundColor: Theme.of(
context,
).colorScheme.surfaceContainerLow,
@@ -52,33 +87,28 @@ class _LibraryScreenState extends State<LibraryScreen>
SliverPersistentHeader(
delegate: _FTabBarHeaderDelegate(
height: settingsProvider.themeStyle == ThemeStyle.florid
? 68
? 64
: 56,
child: Material(
color: Theme.of(context).colorScheme.surfaceContainerLow,
surfaceTintColor: Theme.of(
context,
).colorScheme.surfaceContainerLow,
child: Container(
margin: settingsProvider.themeStyle == ThemeStyle.florid
? const EdgeInsets.only(top: 8)
: null,
child: FTabBar(
controller: _tabController,
onTabChanged: (index) {
_tabController.animateTo(index);
},
items: [
FloridTabBarItem(
icon: Symbols.home,
label: AppLocalizations.of(context)!.home,
),
FloridTabBarItem(
icon: Symbols.category,
label: AppLocalizations.of(context)!.categories,
),
],
),
child: FTabBar(
controller: _tabController,
onTabChanged: (index) {
_tabController.animateTo(index);
},
items: [
FloridTabBarItem(
icon: Symbols.home,
label: AppLocalizations.of(context)!.home,
),
FloridTabBarItem(
icon: Symbols.category,
label: AppLocalizations.of(context)!.categories,
),
],
),
),
),
+18 -9
View File
@@ -1,5 +1,7 @@
import 'package:florid/providers/settings_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:provider/provider.dart';
class FNavBar extends StatelessWidget {
const FNavBar({
@@ -30,6 +32,8 @@ class FNavBar extends StatelessWidget {
final accentColor = scheme.primary.withValues(alpha: 0.2);
final selectedColor = scheme.primary;
final unselectedColor = scheme.onSurfaceVariant;
final settings = context.watch<SettingsProvider>();
final isFlorid = settings.themeStyle == ThemeStyle.florid;
return SafeArea(
top: false,
@@ -87,15 +91,20 @@ class FNavBar extends StatelessWidget {
milliseconds: 180,
),
curve: Curves.easeOut,
style: TextStyle(
color: selected
? selectedColor
: unselectedColor,
fontSize: 14,
fontVariations: [
FontVariation('ROND', 100),
],
),
style: isFlorid
? TextStyle(
color: selected
? selectedColor
: unselectedColor,
fontSize: 14,
fontVariations: [
FontVariation(
'ROND',
100,
),
],
)
: TextStyle(inherit: true),
child: Text(item.label),
)
.animate()
+40
View File
@@ -435,6 +435,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.3"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "87fbd7c534435b6c5d9d98b01e1fd527812b82e68ddd8bd35fc45ed0fa8f0a95"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -709,6 +717,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: "direct main"
description:
@@ -1194,6 +1210,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.5.2"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
url: "https://pub.dev"
source: hosted
version: "1.1.19"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "201e876b5d52753626af64b6359cd13ac6011b80728731428fd34bc840f71c9b"
url: "https://pub.dev"
source: hosted
version: "1.1.20"
vector_math:
dependency: transitive
description:
+2
View File
@@ -91,6 +91,7 @@ dependencies:
flutter_localizations:
sdk: flutter
intl: any
flutter_svg: ^2.2.3
dev_dependencies:
flutter_test:
@@ -119,6 +120,7 @@ flutter:
- assets/Florid.png
- assets/Foreground.png
- assets/Splash.png
- assets/Florid.svg
- assets/repositories.json
- CHANGELOGS.md
# - images/a_dot_burr.jpeg