I want to have the title in my SliverAppBar fade in the default way however it stops working once I apply style to the text. You can see how it behave with and without TextStyle. Nothing else changes.
Here's the code with style applied:
class FeedScreen extends StatelessWidget {
static const routeName = "/feed_screen";
@override
Widget build(BuildContext context) {
return ViewModelBuilder<WhosHereScreenViewModel>.reactive(
disposeViewModel: false,
initialiseSpecialViewModelsOnce: true,
viewModelBuilder: () => locator<WhosHereScreenViewModel>(),
builder: (context, model, child) {
return Scaffold(
backgroundColor: Colors.white,
body: model.isBusy == true
? Center(child: CircularProgressIndicator())
: CustomScrollView(slivers: [
SliverAppBar(
brightness: Brightness.light,
backgroundColor: Colors.white,
title: Text(
'miit',
style: TextStyle(
fontFamily: 'Changa',
fontWeight: FontWeight.w600,
fontSize: 36.0,
color: Colors.black87),
),
titleSpacing: -4.0,
leading: IconButton(
icon: Image.asset('assets/images/new_logo.png'),
onPressed: () {},
),
floating: true,
actions: [
Padding(
padding: const EdgeInsets.only(right: 12.0),
//TODO build filter functionality
child: IconButton(
icon: Icon(Mdi.accountDetailsOutline,
color: Colors.black87, size: 30.0),
onPressed: null),
)
],
),