-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logout button to dualis; Add cancelable requests to dualis
- Loading branch information
1 parent
1565c89
commit 3a11e85
Showing
20 changed files
with
496 additions
and
121 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/// Flutter icons CustomIcons | ||
/// Copyright (C) 2020 by original authors @ fluttericon.com, fontello.com | ||
/// This font was generated by FlutterIcon.com, which is derived from Fontello. | ||
/// | ||
/// To use this font, place it in your fonts/ directory and include the | ||
/// following in your pubspec.yaml | ||
/// | ||
/// flutter: | ||
/// fonts: | ||
/// - family: CustomIcons | ||
/// fonts: | ||
/// - asset: fonts/CustomIcons.ttf | ||
/// | ||
/// | ||
/// * Font Awesome 4, Copyright (C) 2016 by Dave Gandy | ||
/// Author: Dave Gandy | ||
/// License: SIL () | ||
/// Homepage: http://fortawesome.github.com/Font-Awesome/ | ||
/// | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class CustomIcons { | ||
CustomIcons._(); | ||
|
||
static const _kFontFam = 'CustomIcons'; | ||
static const _kFontPkg = null; | ||
|
||
static const IconData logout = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:mutex/mutex.dart'; | ||
import 'cancellation_token.dart'; | ||
|
||
class CancelableMutex { | ||
Mutex _mutex = Mutex(); | ||
CancellationToken _token; | ||
CancellationToken get token => _token; | ||
|
||
void cancel() { | ||
_token?.cancel(); | ||
} | ||
|
||
Future acquireAndCancelOther() async { | ||
if (!(token?.isCancelled() ?? false)) { | ||
token?.cancel(); | ||
} | ||
|
||
_token = CancellationToken(); | ||
|
||
await _mutex.acquire(); | ||
} | ||
|
||
void release() { | ||
_mutex.release(); | ||
_token = null; | ||
} | ||
} |
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
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
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
Oops, something went wrong.