Ubuntu Desktop Installer starting point for Ubuntu flavors
Ubuntu Flavor Installer
Ubuntu Desktop Installer starting point for Ubuntu flavors.
Light | Dark |
---|---|
Getting started
-
Init submodules:
git submodule update --init --recursive
-
Install Subiquity’s dependencies:
make -C packages/subiquity_client/subiquity install_deps
-
Run the installer:
flutter pub get flutter run -d linux
Look and feel
The desktop installer has an entry point that allows passing in the name of the flavor displayed throughout the installation wizard, the desired flavor-specific theme, and the flavor’s own installation slides together with delegates for localization.
import 'package:ubuntu_desktop_installer/installer.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:yaru/yaru.dart';
import 'slides.dart';
Future<void> main(List<String> args) {
return runInstallerApp(
args,
flavor: FlavorData(
name: 'Ubuntu FLAVOR',
theme: yaruMagentaLight,
darkTheme: yaruMagentaDark,
localizationsDelegates: AppLocalizations.localizationsDelegates,
),
slides: [
firstSlide,
secondSlide,
thirdSlide,
],
);
}
FlavorData.theme
and and FlavorData.darkTheme
are ThemeData instances assigned as MaterialApp.theme and MaterialApp.darkTheme, respectively. Flutter chooses the appropriate theme based on the platform brightness. Even though the light and dark theme can be any Flutter themes, it is highly recommended to use one of the Yaru themes that include ready-made variants for many flavors. This ensures good compatibility with the Yaru widgets used throughout the installer. Notice that it’s also possible to partially customize the ready-made themes should a need for that arise:
theme: yaruFooLight.copyWith(
inputDecorationTheme: InputDecorationTheme(
// ...
),
),
Image assets
Images such as logos and theme previews can be customized by overriding assets used in the desktop installer by creating assets by the same name in the flavor installer. Whenever the desktop installer shows images, it looks up the application (flavor) assets first and if not found, falls back to the one in ubuntu_desktop_installer
. Therefore, a flavor can freely choose to override a subset or all images.
The installer organizes its image assets by following such convention that aims to make it easy to understand where each image asset it used: assets/<page>/<image>
. This template has overridden many of the original image assets with purple variants. A few examples:
ubuntu-flavor-installer/
└── assets
├── choose_your_look
│ ├── dark-theme.png
│ └── light-theme.png
├── installation_complete
│ └── logo.png
└── welcome
└── logo.svg
The full set of image assets is visible at ubuntu-desktop-installer/assets.