mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-11 17:19:00 +03:30
59 lines
1.5 KiB
Dart
59 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class FilterScanSaveButton extends StatelessWidget {
|
|
const FilterScanSaveButton({
|
|
Key key,
|
|
@required GlobalKey<FormState> form,
|
|
@required this.idCTRL,
|
|
@required double deviceBlockSize,
|
|
}) : _form = form,
|
|
_deviceBlockSize = deviceBlockSize,
|
|
super(key: key);
|
|
|
|
final GlobalKey<FormState> _form;
|
|
final TextEditingController idCTRL;
|
|
final double _deviceBlockSize;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: () {
|
|
if (!_form.currentState.validate()) {
|
|
return;
|
|
}
|
|
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.only(bottom: 50,left: 20,right: 20),
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [Colors.blue, Colors.green],
|
|
),
|
|
borderRadius: BorderRadius.circular(7),
|
|
),
|
|
child: Align(
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
'GO!',
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 5 * _deviceBlockSize,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|