Common code shared across all Flutter apps in this collection.
GNOME Libadwaita-inspired design system:
// Themes
GnomeTheme.light(accent: GnomeAccent.blue)
GnomeTheme.dark(accent: GnomeAccent.orange)
// Colors
GnomeColors.blue
GnomeColors.green
GnomeColors.orange
// ... 9 accent colorsReusable UI components:
// App bar
GnomeAppBar(
title: Text('My App'),
actions: [...],
)
// Card
GnomeCard(
onTap: () {},
child: ...,
)
// Button
GnomeButton.suggested(
onPressed: () {},
label: 'Confirm',
)
// Loading
GnomeLoadingIndicator()
// Empty states
GnomeEmptyState.search(
query: 'omelette',
onClear: () {},
)Services for in-app purchases and ads:
// Ad service
final adService = AdService();
await adService.initialize();
await adService.showRewardedAd(onRewarded: () {});
// Premium repository
final premiumRepo = PremiumRepository();
await premiumRepo.initialize('my_app_premium');
await premiumRepo.purchasePremium();Add to pubspec.yaml:
dependencies:
shared:
path: ../sharedImport in your code:
import 'package:shared/design/gnome_theme.dart';
import 'package:shared/widgets/gnome_app_bar.dart';
import 'package:shared/monetization/ad_service.dart';| Token | Value | Usage |
|---|---|---|
| Border Radius (Buttons) | 6px | Buttons, inputs |
| Border Radius (Cards) | 12px | Cards, dialogs |
| Primary Blue | #3584E4 | Default accent |
| Orange | #FF7800 | Alternative accent |
Private - All rights reserved.