This commit is contained in:
erfan hayat'bakhsh
2020-08-01 14:16:20 +04:30
parent 30f10dca2e
commit e4d29c4e3c
71 changed files with 5018 additions and 2319 deletions
+12 -7
View File
@@ -1,5 +1,5 @@
import 'package:cssd/config/routes.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class FilterScanSaveButton extends StatelessWidget {
const FilterScanSaveButton({
@@ -7,7 +7,9 @@ class FilterScanSaveButton extends StatelessWidget {
@required GlobalKey<FormState> form,
@required this.idCTRL,
@required double deviceBlockSize,
}) : _form = form, _deviceBlockSize = deviceBlockSize, super(key: key);
}) : _form = form,
_deviceBlockSize = deviceBlockSize,
super(key: key);
final GlobalKey<FormState> _form;
final TextEditingController idCTRL;
@@ -17,20 +19,23 @@ class FilterScanSaveButton extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (! _form.currentState.validate()) {
if (!_form.currentState.validate()) {
return;
}
Navigator.of(context).pushNamed(
Routes.labelDetailScreen,
arguments: idCTRL.text,
launch(
'https://cssd-doc.com/Show/Label/${idCTRL.text}',
);
// Navigator.of(context).pushNamed(
// Routes.labelDetailScreen,
// arguments: idCTRL.text,
// );
},
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5 * _deviceBlockSize,
vertical: 10,
),
margin: EdgeInsets.symmetric(horizontal: 20),
margin: EdgeInsets.only(bottom: 50,left: 20,right: 20),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.blue, Colors.green],