mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 16:26:37 +08:00
39 lines
983 B
Dart
39 lines
983 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:apidash/consts.dart';
|
|
import 'environment_field.dart';
|
|
|
|
class EnvURLField extends StatelessWidget {
|
|
const EnvURLField({
|
|
super.key,
|
|
required this.selectedId,
|
|
this.initialValue,
|
|
this.onChanged,
|
|
this.onFieldSubmitted,
|
|
});
|
|
|
|
final String selectedId;
|
|
final String? initialValue;
|
|
final void Function(String)? onChanged;
|
|
final void Function(String)? onFieldSubmitted;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return EnvironmentField(
|
|
keyId: "url-$selectedId",
|
|
initialValue: initialValue,
|
|
style: kCodeStyle,
|
|
decoration: InputDecoration(
|
|
hintText: kHintTextUrlCard,
|
|
hintStyle: kCodeStyle.copyWith(
|
|
color: Theme.of(context).colorScheme.outline.withOpacity(
|
|
kHintOpacity,
|
|
),
|
|
),
|
|
border: InputBorder.none,
|
|
),
|
|
onChanged: onChanged,
|
|
onFieldSubmitted: onFieldSubmitted,
|
|
);
|
|
}
|
|
}
|