renderInput method
Implementation
@override
Widget renderInput() {
return Column(
children: [
GestureDetector(
onPanStart: _onPanStart,
onPanUpdate: _onPanUpdate,
onPanEnd: _onPanEnd,
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: CustomPaint(
painter: _DrawingPainter(_strokes, _currentStroke),
child: Container(
height: 250,
color: Colors.white,
alignment: Alignment.center,
child:
!_hasDrawn
? const Text(
'Draw here',
style: TextStyle(color: Colors.grey),
)
: null,
),
),
),
),
const SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(onPressed: _clear, child: const Text('Clear')),
ElevatedButton(onPressed: _submit, child: const Text('Done')),
],
),
],
);
}