teeth_selector 0.2.2
teeth_selector: ^0.2.2 copied to clipboard
A simple dental chart showing teeth that can be selected/unselected like a set of checkboxes.
import 'package:flutter/material.dart';
import 'package:teeth_selector/teeth_selector.dart';
void main() => runApp(
MaterialApp(
theme: ThemeData(
primaryColor: Colors.blue,
),
home: MyApp(),
),
);
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
child: Padding(
padding: const EdgeInsets.all(20),
child: TeethSelector(
onChange: (selected) => print(selected),
multiSelect: false,
colorized: {
"15": Colors.teal,
"26": Colors.orange,
"24": Colors.transparent,
},
StrokedColorized: {"24": Colors.grey.withOpacity(0.5)},
notation: (isoString) => "Tooth ISO: $isoString",
selectedColor: Colors.red,
showPrimary: false,
),
),
);
}
}