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( Text(
L10n.global().connectingToServer(widget.account.url), L10n.global().connectingToServer(widget.account.url),
textAlign: TextAlign.center, 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), padding: const EdgeInsets.all(24),
child: Text( child: Text(
L10n.global().signInHeaderText, L10n.global().signInHeaderText,
style: Theme.of(context).textTheme.headline5, style: Theme.of(context).textTheme.headlineSmall,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),

View file

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

View file

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

View file

@ -196,7 +196,7 @@ class _ProviderDescription extends StatelessWidget {
previous.formValue.provider != current.formValue.provider, previous.formValue.provider != current.formValue.provider,
builder: (context, state) => Text( builder: (context, state) => Text(
state.formValue.provider.toDescription(context), 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, previous.formValue.provider != current.formValue.provider,
builder: (context, state) => Text( builder: (context, state) => Text(
state.formValue.provider.toDescription(context), 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: [ children: [
Text( Text(
L10n.global().dateSubtitle, L10n.global().dateSubtitle,
style: Theme.of(context).textTheme.subtitle2, style: Theme.of(context).textTheme.titleSmall,
), ),
Row( Row(
children: [ children: [
@ -104,7 +104,7 @@ class _PhotoDateTimeEditDialogState extends State<PhotoDateTimeEditDialog> {
const SizedBox(height: 16), const SizedBox(height: 16),
Text( Text(
L10n.global().timeSubtitle, L10n.global().timeSubtitle,
style: Theme.of(context).textTheme.subtitle2, style: Theme.of(context).textTheme.titleSmall,
), ),
Row( Row(
children: [ children: [

View file

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

View file

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

View file

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

View file

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

View file

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