Advertisement
Guest User

Untitled

a guest
Mar 13th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.53 KB | None | 0 0
  1. BlocEventStateBuilder(
  2.   bloc: distanceBloc,
  3.   builder: (
  4.   BuildContext context,
  5.       DistanceCalculationState state,
  6.   ) {
  7.   Widget result = Container(
  8.   height: 0.0,
  9.   width: 0.0,
  10.   );
  11.  
  12.   if (state.isCalculating) {
  13.   Scaffold.of(context).showSnackBar(
  14.   SnackBar(
  15.   content: Text(
  16.   'duration ${state.durationResponse.text} distance ${state.distanceResponse.text}',
  17.   style: Theme.of(context)
  18.       .textTheme
  19.       .subhead
  20.       .copyWith(color: Colors.black54),
  21.   ),
  22.   ),
  23.   );
  24.   }
  25.  
  26.   return result;
  27.   },
  28.   )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement