我是新來的顫振得到這個錯誤。有人可以幫忙嗎?嘗試和文本樣式。

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熱心網友回復:
您可以使用toolBarTextStyleandtitleTextStyle代替textTheme. 有關更多詳細資訊,請參閱下面的鏈接
textTheme
uj5u.com熱心網友回復:
你可以titleTextStyle這樣使用:
appBarTheme: AppBarTheme(
titleTextStyle: TextStyle(color: Colors.blue)
)
appBar: AppBar(
title: Text(
' ',
style: Theme.of(context).appBarTheme.titleTextStyle,
),
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/409973.html
標籤:
