Skip to content

A new app is out here is the script #17178

@KyleSadlr

Description

@KyleSadlr

import 'package:flutter/material.dart';

// Entry Point
void main() {
runApp(EmojiMixerApp());
}

// Root of the app
class EmojiMixerApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Emoji Mixer',
theme: ThemeData(
primarySwatch: Colors.purple,
brightness: Brightness.light,
),
home: EmojiMixerHome(),
debugShowCheckedModeBanner: false,
);
}
}

// Home Screen
class EmojiMixerHome extends StatefulWidget {
@OverRide
_EmojiMixerHomeState createState() => _EmojiMixerHomeState();
}

class _EmojiMixerHomeState extends State {
// Controllers for emoji inputs
final TextEditingController emojiOneController = TextEditingController();
final TextEditingController emojiTwoController = TextEditingController();
String resultEmoji = ""; // Combined emoji result

// Function to combine emojis
void mixEmojis() {
String emoji1 = emojiOneController.text;
String emoji2 = emojiTwoController.text;

setState(() {
  resultEmoji = "$emoji1$emoji2"; // Simple concatenation of the emojis
});

}

// Function to share emoji (placeholder)
void shareEmoji() {
final snackBar = SnackBar(content: Text('Shared Emoji: $resultEmoji'));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
// Integration with social/media sharing can be added later (like Share plugin)
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Emoji Mixer'),
centerTitle: true,
actions: [
IconButton(
icon: Icon(Icons.info),
onPressed: () {
showAboutDialog(
context: context,
applicationName: "Emoji Mixer",
applicationVersion: "1.0.0",
children: [Text("Mix emojis, customize them, and share your creations.")],
);
},
),
],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Input 1
TextField(
controller: emojiOneController,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter Emoji 1',
),
style: TextStyle(fontSize: 24),
textAlign: TextAlign.center,
),
SizedBox(height: 20),

        // Input 2
        TextField(
          controller: emojiTwoController,
          decoration: InputDecoration(
            border: OutlineInputBorder(),
            labelText: 'Enter Emoji 2',
          ),
          style: TextStyle(fontSize: 24),
          textAlign: TextAlign.center,
        ),
        SizedBox(height: 30),

        // Mix Button
        ElevatedButton(
          onPressed: mixEmojis,
          child: Text(
            'Mix Emojis',
            style: TextStyle(fontSize: 20),
          ),
          style: ElevatedButton.styleFrom(
            padding: EdgeInsets.symmetric(vertical: 15),
          ),
        ),
        SizedBox(height: 30),

        // Result Display
        Center(
          child: Column(
            children: [
              Text(
                'Result:',
                style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
              ),
              SizedBox(height: 10),
              Text(
                resultEmoji,
                style: TextStyle(fontSize: 42),
              ),
            ],
          ),
        ),
        Spacer(),

        // Share Button
        ElevatedButton.icon(
          onPressed: shareEmoji,
          icon: Icon(Icons.share),
          label: Text(
            'Share Emoji',
            style: TextStyle(fontSize: 18),
          ),
          style: ElevatedButton.styleFrom(
            padding: EdgeInsets.symmetric(vertical: 15),
          ),
        ),
      ],
    ),
  ),
);

}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions