This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:meta/meta.dart'; | |
import 'package:hasura_connect/hasura_connect.dart'; | |
import 'package:http/http.dart' as http; | |
// problem: | |
// when subscribing to`HasuraConnect.subscription`, a websocket connection is created on the first subscription | |
// call. The websocket connection is created only once with the initial subscription and the provided TokenInterceptor | |
// or headers. When the token expires during an active subscription, HasuraConnect doesn't stop the subscription, or try | |
// to reconnect with the latest token in in the TokenInterceptor nor does it throw an error. It'll keep calling `onRequest` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class AnimatedCount extends ImplicitlyAnimatedWidget { | |
AnimatedCount({ | |
Key key, | |
@required this.count, | |
@required Duration duration, | |
Curve curve = Curves.linear, | |
}) : super(duration: duration, curve: curve, key: key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_web/material.dart'; | |
import 'dart:math' as math; | |
class DottedBorder extends StatelessWidget { | |
final Color color; | |
final double strokeWidth; | |
final double gap; | |
final Widget child; | |
final EdgeInsets padding; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |