Migrate deprecated text themes

This commit is contained in:
Ming Ming 2023-05-26 19:45:46 +08:00
parent 3d49055fc1
commit fd347223a2
12 changed files with 20 additions and 18 deletions

View file

@ -95,8 +95,8 @@ class _ConnectState extends State<Connect> {
Text(
L10n.global().connectingToServer(widget.account.url),
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headline6,
)
style: Theme.of(context).textTheme.titleLarge,
),
],
),
),

View file

@ -79,7 +79,7 @@ class _SignInState extends State<SignIn> {
padding: const EdgeInsets.all(24),
child: Text(
L10n.global().signInHeaderText,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center,
),
),

View file

@ -63,7 +63,7 @@ class _AlbumDirPickerState extends State<AlbumDirPicker> {
children: [
Text(
L10n.global().albumDirPickerHeaderText,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),

View file

@ -111,7 +111,7 @@ class _AlbumImporterState extends State<AlbumImporter> {
children: [
Text(
L10n.global().albumImporterHeaderText,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),

View file

@ -196,7 +196,7 @@ class _ProviderDescription extends StatelessWidget {
previous.formValue.provider != current.formValue.provider,
builder: (context, state) => Text(
state.formValue.provider.toDescription(context),
style: Theme.of(context).textTheme.bodyText2,
style: Theme.of(context).textTheme.bodyMedium,
),
);
}

View file

@ -271,7 +271,7 @@ class _ProviderDescription extends StatelessWidget {
previous.formValue.provider != current.formValue.provider,
builder: (context, state) => Text(
state.formValue.provider.toDescription(context),
style: Theme.of(context).textTheme.bodyText2,
style: Theme.of(context).textTheme.bodyMedium,
),
);
}

View file

@ -32,7 +32,7 @@ class _PhotoDateTimeEditDialogState extends State<PhotoDateTimeEditDialog> {
children: [
Text(
L10n.global().dateSubtitle,
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
),
Row(
children: [
@ -104,7 +104,7 @@ class _PhotoDateTimeEditDialogState extends State<PhotoDateTimeEditDialog> {
const SizedBox(height: 16),
Text(
L10n.global().timeSubtitle,
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
),
Row(
children: [

View file

@ -93,7 +93,7 @@ class _RootPickerState extends State<RootPicker> {
children: [
Text(
L10n.global().rootPickerHeaderText,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),

View file

@ -157,11 +157,13 @@ class _ExifState extends State<_Exif> {
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(L10n.global().setupSettingsModifyLaterHint,
style: Theme.of(context)
.textTheme
.bodyText2!
.copyWith(fontStyle: FontStyle.italic)),
child: Text(
L10n.global().setupSettingsModifyLaterHint,
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(fontStyle: FontStyle.italic),
),
),
const SizedBox(height: 8),
],

View file

@ -67,7 +67,7 @@ class _ShareFolderPickerState extends State<ShareFolderPicker> {
children: [
Text(
L10n.global().settingsShareFolderDialogTitle,
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),

View file

@ -74,7 +74,7 @@ class _SlideshowDialogState extends State<SlideshowDialog> {
children: [
Text(
L10n.global().slideshowSetupDialogDurationTitle,
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
),
Row(
children: [

View file

@ -91,7 +91,7 @@ class _SplashState extends State<Splash> {
Text(
L10n.global().appTitle,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
],
),