Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Fix/show step1 (#92)
Browse files Browse the repository at this point in the history
* (fix/show_step1) : Wishlist share process indicator visible on short process

* (fix/show_step1) :
Wishlist share process indicator visible on short process
  • Loading branch information
zohra051 authored Jul 28, 2020
1 parent d67cf1f commit 86bcb3f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Authentication-page : Account creation page not scrollable
- Loyalty Cards Page : Changed floating button icon
- Widget_item : Product designation overflow
- Share_one and Mainpage : Wishlist share process indicator visible on short process

### Security

Expand Down
8 changes: 7 additions & 1 deletion lib/pages/Mainpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:MobileOne/pages/profile.dart';
import 'package:MobileOne/pages/share.dart';
import 'package:MobileOne/services/user_service.dart';
import 'package:MobileOne/utility/colors.dart';
import 'package:MobileOne/utility/arguments.dart';
import 'package:barcode_scan/barcode_scan.dart';
import 'package:flutter/material.dart';
import 'package:MobileOne/providers/user_picture_provider.dart';
Expand Down Expand Up @@ -41,6 +42,7 @@ class MainPageState extends State<MainPage> {
Function _floatingButtonAction;

final PageStorageBucket _bucket = PageStorageBucket();
bool isOnlyOneStep = false;

@override
void initState() {
Expand Down Expand Up @@ -172,7 +174,11 @@ class MainPageState extends State<MainPage> {
}

goToShareOnePage() {
Navigator.of(context).pushNamed("/shareOne");
isOnlyOneStep = false;
Navigator.of(context).pushNamed("/shareOne",
arguments: ShareArguments(
isOnlyOneStep: isOnlyOneStep,
));
}

goToSharePage() {
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/openedListPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:MobileOne/localization/localization.dart';
import 'package:MobileOne/providers/itemsList_provider.dart';
import 'package:MobileOne/providers/wishlistsList_provider.dart';
import 'package:MobileOne/services/user_service.dart';
import 'package:MobileOne/utility/arguments.dart';
import 'package:MobileOne/widgets/widget_item.dart';
import 'package:MobileOne/widgets/widget_popup.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down Expand Up @@ -264,6 +265,7 @@ class OpenedListPageState extends State<OpenedListPage> {
}

void openSharePage(Object uuid) {
Navigator.of(context).pushNamed('/shareOne', arguments: uuid);
Navigator.of(context)
.pushNamed('/shareOne', arguments: ShareArguments(previousList: uuid));
}
}
4 changes: 3 additions & 1 deletion lib/pages/share.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:MobileOne/localization/localization.dart';
import 'package:MobileOne/providers/share_provider.dart';
import 'package:MobileOne/utility/arguments.dart';
import 'package:MobileOne/widgets/widget_share_lists.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -131,7 +132,8 @@ class ShareState extends State<Share> {
}

void openShareOnePage() {
Navigator.pushNamed(context, '/shareOne', arguments: previousList);
Navigator.pushNamed(context, '/shareOne',
arguments: ShareArguments(previousList: previousList));
}

void openMainPage() {
Expand Down
11 changes: 7 additions & 4 deletions lib/pages/share_one.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:MobileOne/localization/localization.dart';
import 'package:MobileOne/providers/share_provider.dart';
import 'package:MobileOne/utility/arguments.dart';
import 'package:MobileOne/widgets/widget_share_contact.dart';
import 'package:contacts_service/contacts_service.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -72,16 +73,18 @@ class ShareStateOneState extends State<ShareOne> {
}

Widget build(BuildContext context) {
final previousList = ModalRoute.of(context).settings.arguments;
ShareArguments _argsShare = ModalRoute.of(context).settings.arguments;
bool isSearching = _myController.text.isNotEmpty;
return Scaffold(
resizeToAvoidBottomPadding: false,
body: Column(
children: <Widget>[
header(context),
headerSteps(context),
(_argsShare.isOnlyOneStep == false)
? headerSteps(context)
: Container(height: MediaQuery.of(context).size.height * 0.1),
searchContact(context),
searchNewContact(context, previousList),
searchNewContact(context, _argsShare.previousList),
Padding(
padding: EdgeInsets.only(top: 5),
child: Container(
Expand All @@ -91,7 +94,7 @@ class ShareStateOneState extends State<ShareOne> {
? Center(
child: CircularProgressIndicator(),
)
: buildListView(isSearching, previousList),
: buildListView(isSearching, _argsShare.previousList),
),
)
],
Expand Down
6 changes: 6 additions & 0 deletions lib/utility/arguments.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ class CardArguments {

CardArguments(this.cards, this.colorOfCard);
}

class ShareArguments {
var previousList;
bool isOnlyOneStep;
ShareArguments({this.previousList, this.isOnlyOneStep});
}

0 comments on commit 86bcb3f

Please sign in to comment.