upgrade packages

This commit is contained in:
tzw
2024-01-09 13:11:22 +06:30
parent cbd8ddad08
commit 3e1c61a9f6
32 changed files with 193 additions and 150 deletions

View File

@@ -58,7 +58,7 @@ class _DialogInputState extends State<DialogInput> {
),
),
actions: <Widget>[
FlatButton(
TextButton(
child: LocalText(
context,
'btn.cancel',
@@ -68,8 +68,9 @@ class _DialogInputState extends State<DialogInput> {
_controller.clear();
Navigator.of(context).pop();
}),
FlatButton(
color: primaryColor,
TextButton(
style: TextButton.styleFrom(backgroundColor: primaryColor),
// color: primaryColor,
child: LocalText(
context,
'btn.ok',

View File

@@ -32,7 +32,9 @@ class _FcsExpansionTileState extends State<FcsExpansionTile> {
Widget build(BuildContext context) {
return Theme(
data: ThemeData(
accentColor: primaryColor, dividerColor: Colors.transparent),
dividerColor: Colors.transparent,
colorScheme:
ColorScheme.fromSwatch().copyWith(secondary: primaryColor)),
child: ExpansionTile(
onExpansionChanged: (value) {
setState(() {

View File

@@ -42,7 +42,7 @@ class _LengthPickerState extends State<LengthPicker> {
}
_setText() {
double v = double.parse(widget.controller!.text, (s) => 0);
double v = double.parse(widget.controller!.text);
int _v = v.toInt();
int f = (v / 12).floor();
@@ -107,7 +107,7 @@ class _LengthPickerDialogState extends State<LengthPickerDialog> {
_valueFeet = 0;
_valueInc = 0;
if (widget.controller != null) {
double v = double.parse(widget.controller!.text, (s) => 0);
double v = double.parse(widget.controller!.text);
_valueFeet = (v / 12).floor();
_valueInc = widget.displayFeet! ? (v % 12).toInt() : v.toInt();
inchInputController.text = _valueInc.toString();

View File

@@ -32,7 +32,7 @@ class LocalButton extends StatelessWidget {
child: ButtonTheme(
minWidth: 900.0,
height: 100.0,
child: FlatButton(
child: TextButton(
onPressed: callBack == null ? null : () => callBack!(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -176,7 +176,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
}
_openImagePicker(bool camera) async {
var selectedFile = await ImagePicker().getImage(
var selectedFile = await ImagePicker().pickImage(
source: camera ? ImageSource.camera : ImageSource.gallery,
imageQuality: 80,
maxWidth: 1000);
@@ -213,7 +213,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
await _dialog(
context, () => camera = true, () => gallery = true);
if (camera || gallery) {
var selectedFile = await ImagePicker().getImage(
var selectedFile = await ImagePicker().pickImage(
source: camera ? ImageSource.camera : ImageSource.gallery,
imageQuality: 80,
maxWidth: 1000);

View File

@@ -773,20 +773,20 @@ class TableRowInkWell extends InkResponse {
RectCallback getRectCallback(RenderBox referenceBox) {
return () {
RenderObject cell = referenceBox;
AbstractNode? table = cell.parent;
RenderObject? table = cell.parent;
final Matrix4 transform = Matrix4.identity();
while (table is RenderObject && table is! RenderTable) {
final RenderObject parentBox = table as RenderObject;
final RenderObject parentBox = table;
parentBox.applyPaintTransform(cell, transform);
assert(table == cell.parent);
cell = parentBox;
table = table.parent;
table = table?.parent;
}
if (table is RenderTable) {
final TableCellParentData cellParentData =
cell.parentData as TableCellParentData;
assert(cellParentData.y != null);
final Rect rect = table.getRowBox(cellParentData.y!);
final Rect rect = table .getRowBox(cellParentData.y!);
// The rect is in the table's coordinate space. We need to change it to the
// TableRowInkWell's coordinate space.
table.applyPaintTransform(cell, transform);