@@ -2,6 +2,9 @@ import 'dart:async';
22import 'dart:developer' ;
33
44// import '../teamPages/player_options.dart';
5+ import 'package:samba_stats/views/pages/sections/widgets/hand_ball_options.dart' ;
6+
7+ import '../../test.dart' ;
58import '/exports/exports.dart' ;
69import '/models/player.dart' ;
710import '/services/player_service.dart' ;
@@ -181,14 +184,36 @@ class _PlayersState extends State<Players> with TickerProviderStateMixin {
181184 },
182185 trailing: IconButton (
183186 onPressed: () {
184- showModalSheet (
185- POptions (
186- player: snap.data! [index],
187- teamId: widget.teamId! ,
188- leagueId: widget.leagueId! ,
189- ),
190- controller: _controller,
191- );
187+ String league1 = "667a7dfe69692a12fae2c2a9" ;
188+ String league2 = "667a7d9769692a12fae2c16b" ;
189+ if (widget.leagueId != null ) {
190+ if (widget.leagueId == league2 ||
191+ widget.leagueId == league1) {
192+ showModalSheet (
193+ POptions (
194+ player: snap.data! [index],
195+ teamId: widget.teamId! ,
196+ leagueId: widget.leagueId! ,
197+ ),
198+ controller: _controller,
199+ );
200+ // Routes.animateToPage(
201+ // HandBallOptions(
202+ // playerId: snap.data![index].id,
203+ // leagueId: widget.leagueId!,
204+ // ),
205+ // );
206+ } else {
207+ showModalSheet (
208+ POptions (
209+ player: snap.data! [index],
210+ teamId: widget.teamId! ,
211+ leagueId: widget.leagueId! ,
212+ ),
213+ controller: _controller,
214+ );
215+ }
216+ }
192217 },
193218 icon: const Icon (Icons .edit_rounded),
194219 ),
0 commit comments