• notice
  • Congratulations on the launch of the Sought Tech site

What is an alternative to textTheme in flutter. I am getting the following error

I am new to Flutter and getting this error.Can anyone help? Try and text style.

What is an alternative to textTheme in Flutter.I am getting the following error

import 'package:flutter/material.dart';
import 'screens/location_detail/location_detail.dart';
import 'style.dart';


class App extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
   return MaterialApp(
     home:LocationDetail(),
     theme:ThemeData(
       appBarTheme: AppBarTheme(
         textTheme: TextTheme(title: AppBarTextStyle)
      )
    )
  );
  }
}

uj5u.com enthusiastic netizens replied:

You can usetoolBarTextStyleandtitleTextStyle instead of textTheme.For more details, see the link below textTheme

uj5u.com enthusiastic netizens replied:

You cantitleTextStyleUse like this:

appBarTheme: AppBarTheme(
     titleTextStyle: TextStyle(color: Colors.blue)
)

appBar: AppBar(
    title: Text(
      ' ',
      style: Theme.of(context).appBarTheme.titleTextStyle,
   ),

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+