This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate business logic from UI widgets
Ensure that all business logic is performed in "pure" non-widget code. This improves code structure, testability etc. The widget `RefreshTermsAndConditionsScreen` is entirely removed as refresh logic doesn't belong in the view layer. All global (shared preferences) and network-specific (wallet-proxy) services are exposed as a "service repository" provided to the root of the widget tree along with separate watchable state components ("change notifiers") for selected network and T&C acceptance. The file state.dart is split into one file in `state/` for each of these state components. The currently valid T&C version is fetched when initializing the "home" screen. The time-based logic of reloading this version is removed as it isn't clear how it actually should be implemented. It probably should be only when we're opening/waking up the app.
- Loading branch information
Showing
14 changed files
with
321 additions
and
185 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import 'package:http/http.dart' as http; | ||
|
||
class HttpService { | ||
HttpService(); | ||
const HttpService(); | ||
|
||
Future<http.Response> get(Uri url) async { | ||
// TODO: Implement retry logic. | ||
return http.get(url); | ||
} | ||
} |
Oops, something went wrong.