|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using RSG; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.gestures; |
|
|
|
using Unity.UIWidgets.material; |
|
|
|
using Unity.UIWidgets.painting; |
|
|
|
using Unity.UIWidgets.rendering; |
|
|
|
|
|
|
GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>.key(); |
|
|
|
|
|
|
|
VoidCallback _showBottomSheetCallback; |
|
|
|
|
|
|
|
TapGestureRecognizer _tapRecognizer; |
|
|
|
HoverRecognizer _hoverRecognizer; |
|
|
|
|
|
|
|
this._tapRecognizer = new TapGestureRecognizer(); |
|
|
|
this._tapRecognizer.onTap = () => { |
|
|
|
Debug.Log("Tap"); |
|
|
|
}; |
|
|
|
this._hoverRecognizer = new HoverRecognizer(); |
|
|
|
this._hoverRecognizer.OnPointerEnter = (evt) => { Debug.Log("Pointer Enter"); }; |
|
|
|
this._hoverRecognizer.OnPointerLeave = () => { Debug.Log("Pointer Leave"); }; |
|
|
|
} |
|
|
|
|
|
|
|
void _showBottomSheet() { |
|
|
|
|
|
|
return new Scaffold( |
|
|
|
key: this._scaffoldKey, |
|
|
|
appBar: new AppBar( |
|
|
|
title: new RichText( |
|
|
|
text: new TextSpan( |
|
|
|
text: "Can you ", |
|
|
|
style: new TextStyle(color: Colors.black), |
|
|
|
children: new List<TextSpan>() { |
|
|
|
new TextSpan( |
|
|
|
text: "find the", |
|
|
|
style: new TextStyle( |
|
|
|
color: Colors.green, |
|
|
|
decoration: TextDecoration.underline |
|
|
|
), |
|
|
|
recognizer: this._tapRecognizer, |
|
|
|
hoverRecognizer: this._hoverRecognizer |
|
|
|
), |
|
|
|
new TextSpan( |
|
|
|
text: " secret?" |
|
|
|
) |
|
|
|
} |
|
|
|
)), |
|
|
|
title: new Text("Basic AppBar"), |
|
|
|
actions: new List<Widget> { |
|
|
|
new IconButton( |
|
|
|
icon: new Icon(Choice.choices[0].icon), |
|
|
|
|
|
|
children: new List<Widget> { |
|
|
|
new Icon(this.choice.icon, size: 128.0f, color: textStyle.color), |
|
|
|
new RaisedButton( |
|
|
|
//child: new Text(this.choice.title, style: textStyle),
|
|
|
|
child: new Icon(Unity.UIWidgets.material.Icons.pool), |
|
|
|
child: new Text(this.choice.title, style: textStyle), |
|
|
|
onPressed: () => { |
|
|
|
SnackBar snackBar = new SnackBar( |
|
|
|
content: new Text(this.choice.title + " is chosen !"), |
|
|
|