Skip to content

Commit

Permalink
fix onboarding flow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlipa91 committed Nov 5, 2023
1 parent 656a1c7 commit 0975b8e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 21 deletions.
37 changes: 21 additions & 16 deletions lib/screens/CreateMatch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -846,26 +846,31 @@ class CreateMatchState extends State<CreateMatch> {
bool? v = _formKey.currentState?.validate();
if (v != null && v) {
try {
var dateTime = tz.TZDateTime(
tz.getLocation(sportCenter!.timezoneId),
start!.year,
start!.month,
start!.day,
startTime!.hour,
startTime!.minute);
var endDateTime = tz.TZDateTime(
tz.getLocation(sportCenter!.timezoneId),
start!.year,
start!.month,
start!.day,
endTime!.hour,
endTime!.minute);
var forWeeks = repeatsForWeeks;

Iterable<Future<String>> idsFuture =
Iterable<int>.generate(forWeeks).map((w) async {
var dToAdd = Duration(days: 7 * w);

var startDateTime = tz.TZDateTime(
tz.getLocation(sportCenter!.timezoneId),
start!.year,
start!.month,
start!.day,
startTime!.hour,
startTime!.minute)
.add(dToAdd);
var endDateTime = tz.TZDateTime(
tz.getLocation(sportCenter!.timezoneId),
start!.year,
start!.month,
start!.day,
endTime!.hour,
endTime!.minute)
.add(dToAdd);

var match = Match(
dateTime,
startDateTime,
(isSavedSportCenter)
? sportCenter!.placeId
: null,
Expand All @@ -880,7 +885,7 @@ class CreateMatchState extends State<CreateMatch> {
.toInt(),
organiserWithFee ? 50 : 0)
: null,
endDateTime.difference(dateTime),
endDateTime.difference(startDateTime),
isTest,
numberOfPeopleRangeValues.start.toInt(),
widget.existingMatch != null
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/Launch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ class LaunchWidgetState extends State<LaunchWidget> {
color: Palette.primary,
),
child:
Stack(children: [getBackgoundImages(context), mainWidgets])));
Stack(children: [getBackgroundImages(context), mainWidgets])));
}

static Widget getBackgoundImages(BuildContext context) => Row(children: [
static Widget getBackgroundImages(BuildContext context) => Row(children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/Login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Login extends StatelessWidget {
Container(
constraints: BoxConstraints.expand(),
decoration: new BoxDecoration(color: Palette.primary)),
LaunchWidgetState.getBackgoundImages(context),
LaunchWidgetState.getBackgroundImages(context),
LoginArea(from: from)
])
),
Expand Down
1 change: 1 addition & 0 deletions lib/screens/MatchDetails.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ class MatchDetailsState extends State<MatchDetails> {
var widgets;
if (skeletons == null) {
var completeOrganiserWidget = organizerView &&
match.price != null &&
userState.getLoggedUserDetails()?.areChargesEnabled(isTest) !=
null &&
!userState.getLoggedUserDetails()!.areChargesEnabled(isTest)
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/PlayerOfTheMatch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PlayerOfTheMatch extends StatelessWidget {
Container(
constraints: BoxConstraints.expand(),
decoration: new BoxDecoration(color: Palette.primary)),
LaunchWidgetState.getBackgoundImages(context),
LaunchWidgetState.getBackgroundImages(context),
MainArea(userId: userId ?? context.read<UserState>().currentUserId!)
]),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/UserPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class UserPageState extends State<UserPage> {
widgets.addAll([
Row(children: [
Expanded(
child: CompleteOrganiserAccountWidget(isTest: true))
child: CompleteOrganiserAccountWidget(isTest: isTest))
]),
verticalSpace
]);
Expand Down

0 comments on commit 0975b8e

Please sign in to comment.