mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 10:58:40 +00:00
74 lines
2.2 KiB
Dart
Executable file
74 lines
2.2 KiB
Dart
Executable file
import 'package:flutter/material.dart';
|
|
import 'package:twonly/src/components/image_editor/data/data.dart';
|
|
import 'package:twonly/src/components/image_editor/data/layer.dart';
|
|
|
|
class Emojis extends StatefulWidget {
|
|
const Emojis({super.key});
|
|
|
|
@override
|
|
createState() => _EmojisState();
|
|
}
|
|
|
|
class _EmojisState extends State<Emojis> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SingleChildScrollView(
|
|
child: Container(
|
|
padding: const EdgeInsets.all(0.0),
|
|
height: 400,
|
|
decoration: const BoxDecoration(
|
|
borderRadius: BorderRadius.only(
|
|
topLeft: Radius.circular(32),
|
|
topRight: Radius.circular(32),
|
|
),
|
|
color: Colors.black,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
blurRadius: 10.9,
|
|
color: Color.fromRGBO(0, 0, 0, 0.1),
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
children: [
|
|
const SizedBox(height: 16),
|
|
Container(
|
|
height: 315,
|
|
padding: const EdgeInsets.all(0.0),
|
|
child: GridView(
|
|
shrinkWrap: true,
|
|
physics: const ClampingScrollPhysics(),
|
|
scrollDirection: Axis.vertical,
|
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
|
mainAxisSpacing: 0.0,
|
|
maxCrossAxisExtent: 60.0,
|
|
),
|
|
children: emojis.map((String emoji) {
|
|
return GridTile(
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
Navigator.pop(
|
|
context,
|
|
EmojiLayerData(
|
|
text: emoji,
|
|
),
|
|
);
|
|
},
|
|
child: Container(
|
|
padding: EdgeInsets.zero,
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
emoji,
|
|
style: const TextStyle(fontSize: 35),
|
|
),
|
|
),
|
|
));
|
|
}).toList(),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|