Skip to content

Commit

Permalink
Show sheet for active account (#90)
Browse files Browse the repository at this point in the history
* show sheet for active account

* minor change

* rebase
  • Loading branch information
cp-sidhdhi-p authored Sep 5, 2024
1 parent 53dd059 commit 5ccd710
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions khelo/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
2B44862DDC4A812BCE1A0BD0 /* [CP] Embed Pods Frameworks */,
F404805D228DFD33C4CD9CA3 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
B701D8A68AF0CB72EE4EF76E /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -370,7 +370,7 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
F404805D228DFD33C4CD9CA3 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
B701D8A68AF0CB72EE4EF76E /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class CommentaryOverOverview extends StatelessWidget {
children: [
Flexible(
child: OnTapScale(
enabled: batsmanSummary.player.isActive,
onTap: () => AppRoute.userDetail(userId: batsmanSummary.player.id)
.push(context),
child: Text(
Expand Down Expand Up @@ -170,10 +171,9 @@ class BowlerSummaryView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
OnTapScale(
onTap: isForBowlerIntro
? null
: () => AppRoute.userDetail(userId: bowlerSummary.player.id)
.push(context),
enabled: bowlerSummary.player.isActive && !isForBowlerIntro,
onTap: () => AppRoute.userDetail(userId: bowlerSummary.player.id)
.push(context),
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: isForBowlerIntro ? 16 : 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ class MatchDetailScorecardView extends ConsumerWidget {
if (header != null) ...[
Expanded(
flex: (data.length + 1) ~/ 1.5,
child: OnTapScale(onTap: onTap, child: header)),
child: OnTapScale(
enabled: onTap != null, onTap: onTap, child: header)),
],
for (int i = 0; i < data.length; i++) ...[
Expanded(
Expand Down Expand Up @@ -321,8 +322,9 @@ class MatchDetailScorecardView extends ConsumerWidget {
player.sixes.toString(),
player.strikeRate.toString(),
],
onTap: () =>
AppRoute.userDetail(userId: player.player.id).push(context),
onTap: player.player.isActive
? () => AppRoute.userDetail(userId: player.player.id).push(context)
: null,
header: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
Expand Down Expand Up @@ -374,8 +376,9 @@ class MatchDetailScorecardView extends ConsumerWidget {
bowler.wideBalls.toString(),
bowler.economy.toString(),
],
onTap: () =>
AppRoute.userDetail(userId: bowler.player.id).push(context),
onTap: bowler.player.isActive
? () => AppRoute.userDetail(userId: bowler.player.id).push(context)
: null,
header: Text(
bowler.player.name ?? '',
style: AppTextStyle.subtitle2
Expand Down Expand Up @@ -476,8 +479,9 @@ class MatchDetailScorecardView extends ConsumerWidget {
if (!isLastName) name += ", ";
return WidgetSpan(
child: OnTapScale(
onTap: () =>
AppRoute.userDetail(userId: player.player.id).push(context),
onTap: player.player.isActive
? () => AppRoute.userDetail(userId: player.player.id).push(context)
: null,
child: Text(name,
style: AppTextStyle.caption
.copyWith(color: context.colorScheme.textPrimary)),
Expand Down Expand Up @@ -533,8 +537,9 @@ class MatchDetailScorecardView extends ConsumerWidget {
children.add(TextSpan(text: "${batsmen.runs} ("));
children.add(WidgetSpan(
child: OnTapScale(
onTap: () =>
AppRoute.userDetail(userId: batsmen.player.id).push(context),
onTap: batsmen.player.isActive
? () => AppRoute.userDetail(userId: batsmen.player.id).push(context)
: null,
child: Text(batsmen.player.name ?? '',
style: AppTextStyle.caption
.copyWith(color: context.colorScheme.secondary)))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class MatchDetailSquadView extends ConsumerWidget {
bool isCaptain = user.id == captainId;
return Expanded(
child: OnTapScale(
enabled: user.isActive,
onTap: () => AppRoute.userDetail(userId: user.id).push(context),
child: Padding(
padding: const EdgeInsets.all(16),
Expand Down
4 changes: 2 additions & 2 deletions khelo/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
BDC9585A92128DC0816DD358 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
A3748A825E9FD233B3FCA1ED /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -333,7 +333,7 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
BDC9585A92128DC0816DD358 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
A3748A825E9FD233B3FCA1ED /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down

0 comments on commit 5ccd710

Please sign in to comment.