Open OmarHatem28 opened 5 years ago
Same problem here with InkWell
can i initial the wheel with a given start index?
CircleWheelScroll Accepts initialIndex
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: ellis-wang notifications@github.com Sent: Friday, May 31, 2019 7:17:31 AM To: DenisBogatirov/circle_wheel_scroll Cc: Subscribed Subject: Re: [DenisBogatirov/circle_wheel_scroll] Detect Pressed Item (#2)
can i initial the wheel with a given start index?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/DenisBogatirov/circle_wheel_scroll/issues/2?email_source=notifications&email_token=ADD564VWLZ75D3HM2XGV7RDPYCRFXA5CNFSM4HGSZOR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWUE24A#issuecomment-497569136, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADD564TGSCTNTEPKWZQ7HH3PYCRFXANCNFSM4HGSZORQ.
hi guys, that mean we can't click on the circle ? or there is a ways ?
I'm afraid that issue with gesture detection are connected with ListWheelScrollView
(on which my widget is based on). I've changed my example to use ListWheelScrollView
, and didn't get anything from GestureDetector
. Here is code
import 'package:flutter/material.dart';
class WheelExample extends StatelessWidget {
Widget _buildItem(BuildContext context, int i) {
return GestureDetector(
onTap: () { print('TAP ON ITEM'); },
child: Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(40),
child: Container(
width: 80,
padding: EdgeInsets.all(20),
color: Colors.blue[100 * ((i % 8) + 1)],
child: Center(
child: Text(
i.toString(),
),
),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Wheel example'),
),
body: SafeArea(
child: Center(
child: Container(
child: ListWheelScrollView.useDelegate(
itemExtent: 80,
childDelegate: ListWheelChildBuilderDelegate(
childCount: 10,
builder: _buildItem,
),
),
),
),
),
);
}
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: WheelExample(),
);
}
}
void main() => runApp(MyApp());
Feel free to open issue on flutter repo.
I have the same problem. Does anyone know any solution?
Same problem
same problem, list does not let the item in it detect the tap. Any work around?
Any work around??
No solutions yet?
Greetings, I have tried to wrap the children of CircleListScrollView widget with GestureDetector and FlatButton to execute onTap or onPressed callbacks but none of them is getting called. Also I tried to do the same in ListWheelScrollView and got the same result. Is there a way to detect the pressed item in the list or just by using onSelectedItemChanged ?