Line data Source code
1 : import 'package:flutter/material.dart'; 2 : import 'package:widgetbook/src/utils/extensions.dart'; 3 : 4 : class NoTheme extends StatelessWidget { 5 15 : const NoTheme({Key? key}) : super(key: key); 6 : 7 0 : @override 8 : Widget build(BuildContext context) { 9 0 : return Center( 10 0 : child: Tooltip( 11 : message: 'Make sure to inject a theme into Widgetbook.', 12 0 : child: Row( 13 : mainAxisSize: MainAxisSize.min, 14 0 : children: [ 15 0 : Icon( 16 : Icons.dark_mode, 17 0 : color: context.theme.hintColor, 18 : size: 40, 19 : ), 20 : const SizedBox( 21 : width: 16, 22 : ), 23 0 : Text( 24 : 'No theme defined', 25 0 : style: Theme.of(context).textTheme.headline5, 26 : ), 27 : ], 28 : ), 29 : ), 30 : ); 31 : } 32 : }