Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @override
- Widget build(BuildContext context) {
- final double bottomPadding = MediaQuery.of(context).viewInsets.bottom +
- MediaQuery.of(context).padding.bottom;
- return Positioned(
- bottom: bottomPadding,
- child: Material(
- color: Colors.transparent,
- child: Stack(
- children: [
- GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: widget.onOutsideTap,
- child: Container(
- color: Colors.black.withOpacity(0.35),
- height: MediaQuery.of(context).size.height,
- width: MediaQuery.of(context).size.width,
- ),
- ),
- Positioned(
- bottom: 0,
- child: Container(
- color: AppTheme.accentLightBlue,
- width: MediaQuery.of(context).size.width,
- child: Column(
- children: [
- SizedBox(
- height: 70,
- child: ListView.builder(
- scrollDirection: Axis.horizontal,
- itemCount: _files.length,
- itemBuilder: (context, index) {
- return Padding(
- padding: const EdgeInsets.all(8.0),
- child: ClipRRect(
- borderRadius: BorderRadius.circular(12),
- child: Image.file(
- _files[index],
- height: 54,
- width: 54,
- cacheHeight: 54,
- cacheWidth: 54,
- errorBuilder: (_, __, ___) =>
- const SizedBox.shrink(),
- ),
- ),
- );
- },
- ),
- ),
- TextField(
- controller: widget.controller,
- autofocus: true,
- style: const TextStyle(
- color: AppTheme.typoDarkGrey,
- fontSize: 16,
- ),
- maxLines: 5,
- minLines: 1,
- textInputAction: TextInputAction.done,
- onSubmitted: (value) {
- widget.onSubmit?.call(widget.type);
- },
- focusNode: _focusNode,
- decoration: InputDecoration(
- suffixIcon: SizedBox(
- width: 80,
- child: FittedBox(
- fit: BoxFit.fitHeight,
- child: Padding(
- padding: const EdgeInsets.only(right: 8.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- IconButton(
- padding: const EdgeInsets.all(4),
- icon: const Icon(
- Icons.photo_camera,
- size: 20,
- color: Colors.black,
- ),
- onPressed: () {
- BlocProvider.of<ImageProviderBLoC>(
- context)
- .add(
- const ImageProviderEvent
- .getFromCamera(),
- );
- },
- ),
- IconButton(
- icon: const Icon(
- Icons.collections,
- color: Colors.black,
- ),
- onPressed: () {
- BlocProvider.of<ImageProviderBLoC>(
- context)
- .add(
- const ImageProviderEvent
- .getFromGallery(),
- );
- },
- ),
- ],
- ),
- ),
- )),
- border: const OutlineInputBorder(
- borderSide: BorderSide.none,
- borderRadius: BorderRadius.zero,
- ),
- enabledBorder: const OutlineInputBorder(
- borderSide: BorderSide.none,
- borderRadius: BorderRadius.zero,
- ),
- focusedBorder: const UnderlineInputBorder(
- borderSide: BorderSide.none,
- borderRadius: BorderRadius.zero,
- ),
- hintText: widget.hintText,
- filled: true,
- hintStyle: const TextStyle(
- color: AppTheme.typoDarkGrey,
- fontSize: 16,
- ),
- fillColor: AppTheme.accentLightBlue,
- ),
- ),
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment