mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 09:07:47 +01:00
68 lines
1.9 KiB
Dart
68 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:revanced_manager/models/patch.dart';
|
|
|
|
class OptionsTextField extends StatelessWidget {
|
|
final String hint;
|
|
const OptionsTextField({Key? key, required this.hint}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final sHeight = MediaQuery.of(context).size.height;
|
|
final sWidth = MediaQuery.of(context).size.width;
|
|
return Container(
|
|
margin: const EdgeInsets.only(top: 12, bottom: 6),
|
|
padding: const EdgeInsets.all(0),
|
|
child: TextField(
|
|
decoration: InputDecoration(
|
|
constraints: BoxConstraints(
|
|
maxHeight: sHeight * 0.05,
|
|
maxWidth: sWidth * 1,
|
|
),
|
|
border: const OutlineInputBorder(),
|
|
labelText: hint,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class OptionsFilePicker extends StatelessWidget {
|
|
final String optionName;
|
|
const OptionsFilePicker({Key? key, required this.optionName})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
I18nText(
|
|
optionName,
|
|
child: Text(
|
|
'',
|
|
style: GoogleFonts.inter(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
ElevatedButton(
|
|
style: ButtonStyle(
|
|
backgroundColor: MaterialStateProperty.all(
|
|
Theme.of(context).colorScheme.secondary,
|
|
),
|
|
),
|
|
onPressed: () {
|
|
// pick files
|
|
},
|
|
child: const Text('Select File'),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|