mirror of
https://github.com/block/buzz.git
synced 2026-11-06 17:31:19 +00:00
Community creation now uses the same mobile template, borderless iOS input, and keyboard-coordinated transition as joining, replacing the old welcome screen and boxed field. Name validation, separate form drafts, reduced motion, and accessible error announcements are preserved. Validation: analysis and 4,407 Flutter tests pass (45 skipped, four workers); independent review passed. Kenny approved the simulator preview. Agent verification of the full native transition remains pending; the after snapshot below is a Flutter widget render. | Before | After | | --- | --- | |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
|
|
import '../theme/theme.dart';
|
|
|
|
/// Borderless community address field used by both landing and Add entry.
|
|
class IosCommunityLinkInput extends StatelessWidget {
|
|
const IosCommunityLinkInput({
|
|
super.key,
|
|
required this.controller,
|
|
this.focusNode,
|
|
this.inputKey = const Key('community-link-input'),
|
|
this.placeholder = 'Community link or address',
|
|
this.autofocus = false,
|
|
this.enabled = true,
|
|
this.onChanged,
|
|
this.onSubmitted,
|
|
});
|
|
|
|
final TextEditingController controller;
|
|
final FocusNode? focusNode;
|
|
final Key inputKey;
|
|
final String placeholder;
|
|
final bool autofocus;
|
|
final bool enabled;
|
|
final ValueChanged<String>? onChanged;
|
|
final ValueChanged<String>? onSubmitted;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => CupertinoTextField(
|
|
key: inputKey,
|
|
controller: controller,
|
|
focusNode: focusNode,
|
|
autofocus: autofocus,
|
|
enabled: enabled,
|
|
placeholder: placeholder,
|
|
placeholderStyle: context.textTheme.titleLarge?.copyWith(
|
|
color: CupertinoColors.placeholderText.resolveFrom(context),
|
|
),
|
|
keyboardType: TextInputType.url,
|
|
textInputAction: TextInputAction.go,
|
|
autocorrect: false,
|
|
enableSuggestions: false,
|
|
padding: const EdgeInsets.symmetric(vertical: Grid.xs),
|
|
style: context.textTheme.titleLarge?.copyWith(
|
|
color: context.colors.onSurface,
|
|
),
|
|
cursorColor: context.colors.primary,
|
|
decoration: null,
|
|
onChanged: onChanged,
|
|
onSubmitted: onSubmitted,
|
|
);
|
|
}
|