import
'package:flutter/material.dart'
;
import
'package:flutter_signature_view/flutter_signature_view.dart'
;
void
main() {
runApp(RunMyApp());
}
class
RunMyApp extends StatefulWidget {
const
RunMyApp({super.key});
@override
State<RunMyApp> createState() => _RunMyAppState();
}
class
_RunMyAppState extends State<RunMyApp> {
@override
Widget build(BuildContext context) {
return
MaterialApp(
debugShowCheckedModeBanner:
false
,
title:
'Flutter - Signature View'
,
theme: ThemeData(primarySwatch: Colors.green),
home: Scaffold(
appBar: AppBar(
title: Text(
"Signature View"
),
),
body: SignatureView(
backgroundColor: Colors.white30,
penStyle: Paint()
..color = Color.fromARGB(255, 9, 150, 84)
..strokeCap = StrokeCap.round
..strokeWidth = 5.0,
onSigned: (data) {
print(
"On change $data"
);
},
),
),
);
}
}