Posted By

markt22 on 07/18/18


Tagged

flutter dart


Versions (?)

Flutter: Applying custom themes to widgets


 / Published in: JavaScript
 

Displays a text widget wrapped in a custom theme.

  1. child: Theme(
  2. data: Theme.of(context).copyWith(
  3. textTheme:
  4. TextTheme(body1: TextStyle(color: Colors.yellow))),
  5. child: Builder(builder: (context) {
  6. return Text("Hello",
  7. style: Theme.of(context).textTheme.body1);
  8. }))));

Report this snippet  

You need to login to post a comment.