Need ringWidth, please Advise?
Closed this issue · 2 comments
Hi, I am trying out my project on Web too. Thats where I need the ringWidth. I see you get this from ringDiameter.. and that from screenWidth.
Is there any recommended way that I may get that present ringWidth? Besides doing the entire thing from scratch with Screen class??
Also, if there isnt, how may I know when the widget has finished its constructor, because thats the time I might try to trap the fabKey.currentState.widget.ringDiameter value into a double variable.
thanks,
Great package by the way!
Hi @YohanWadia! Actually, there is a ringWidth
property that you can use:
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Placeholder(),
floatingActionButton: FabCircularMenu(
ringDiameter: 200.0,
ringWidth: 50.0,
children: <Widget>[
IconButton(icon: Icon(Icons.home), onPressed: () {
print('Home');
}),
IconButton(icon: Icon(Icons.favorite), onPressed: () {
print('Favorite');
})
]
)
)
);
}
}
Hi,
First of all, Congratulations of a great package.
I dont think you understood my Q.
you see by default you already have got ring diameter as
screenWidth * 1.25
i wanted to extract that value from your widget... rather than me re doing a
double width = MediaQuery.of(context).size.width;
did you get it?
How could I get it from your already set default value... only if it is possible
thanks.