update fixed page animate

hmxc
张萌 4 years ago
parent 0b78e30878
commit d702d938cc

@ -50,8 +50,9 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
return AnimatedPositioned( return AnimatedPositioned(
bottom: 0, bottom: 0,
top: 0, top: 0,
left: (_canSkew(4) && _isEdit) ? 80.w : 0.w, left: (_canSkew(model.status) && _isEdit) ? 80.w : 0.w,
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOutCubic,
width: 750.w, width: 750.w,
child: GoodsInfoCard( child: GoodsInfoCard(
model: model, model: model,

@ -1,4 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:akuCommunity/widget/buttons/radio_button.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -84,7 +85,7 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
Widget _buildCard(FixedSubmitModel model) { Widget _buildCard(FixedSubmitModel model) {
return AnimatedPositioned( return AnimatedPositioned(
top: 0, top: 0,
left: (_canSkew(model.status) && _isEdit) ? 55.w : 0, left: (_canSkew(4) && _isEdit) ? 55.w : 0,
bottom: 0, bottom: 0,
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
@ -158,19 +159,31 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
} }
Widget _buildCheckBox(FixedSubmitModel model) { Widget _buildCheckBox(FixedSubmitModel model) {
return Container( return GestureDetector(
onTap: () {
if (_selected.contains(model.id)) {
_selected.remove(model.id);
} else {
_selected.add(model.id);
}
setState(() {});
},
child: Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
constraints: BoxConstraints(minHeight: 384.w, minWidth: 686.w), constraints: BoxConstraints(minHeight: 384.w, minWidth: 686.w),
child: FixedCheckBox( // child: FixedCheckBox(
onChanged: (isSelect) { // onChanged: (isSelect) {
if (isSelect) { // if (isSelect) {
_selected.add(model.id); // _selected.add(model.id);
} else { // } else {
_selected.remove(model.id); // _selected.remove(model.id);
} // }
setState(() {}); // setState(() {});
}, // },
)); // ),
child: BeeRadio(value: model.id, groupValues: _selected),
),
);
} }
Widget _showDeletDialog() { Widget _showDeletDialog() {

Loading…
Cancel
Save