I could not use a list as for some reason indexing with a list did not work. The state was always at null. Instead had to use five variables and reused them for all the platforms.
Added a controller for the CupertinoTabScaffold as I need to get the value of index in onWillPop. I initially used a temporary variable and updated its value each time a tab bar item was clicked but because of using await in onWillPop it created trouble. And a controller inherently seems like a better option.
Let me know if there are any changes to be made. Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/pd4d10/git-touch/pull/59
**Author:** [@shreyas1599](https://github.com/shreyas1599)
**Created:** 4/15/2020
**Status:** ✅ Merged
**Merged:** 4/16/2020
**Merged by:** [@pd4d10](https://github.com/pd4d10)
**Base:** `master` ← **Head:** `back-options`
---
### 📝 Commits (2)
- [`47344ba`](https://github.com/pd4d10/git-touch/commit/47344bad656b0e05da77447e76c43796a368e72a) fix: back button android, return home on tap
- [`18c9dc6`](https://github.com/pd4d10/git-touch/commit/18c9dc6d9dee641d648eee50ac808845dd805b16) fix: reuse logic for platforms
### 📊 Changes
**1 file changed** (+49 additions, -6 deletions)
<details>
<summary>View changed files</summary>
📝 `lib/home.dart` (+49 -6)
</details>
### 📄 Description
Fixes #57 and #54
- I could not use a list as for some reason indexing with a list did not work. The state was always at `null`. Instead had to use five variables and reused them for all the platforms.
- Added a controller for the `CupertinoTabScaffold` as I need to get the value of `index` in `onWillPop`. I initially used a temporary variable and updated its value each time a tab bar item was clicked but because of using `await` in `onWillPop` it created trouble. And a controller inherently seems like a better option.
Let me know if there are any changes to be made. Thanks!
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/pd4d10/git-touch/pull/59
Author: @shreyas1599
Created: 4/15/2020
Status: ✅ Merged
Merged: 4/16/2020
Merged by: @pd4d10
Base:
master← Head:back-options📝 Commits (2)
47344bafix: back button android, return home on tap18c9dc6fix: reuse logic for platforms📊 Changes
1 file changed (+49 additions, -6 deletions)
View changed files
📝
lib/home.dart(+49 -6)📄 Description
Fixes #57 and #54
null. Instead had to use five variables and reused them for all the platforms.CupertinoTabScaffoldas I need to get the value ofindexinonWillPop. I initially used a temporary variable and updated its value each time a tab bar item was clicked but because of usingawaitinonWillPopit created trouble. And a controller inherently seems like a better option.Let me know if there are any changes to be made. Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.