Starter Code
Prerequisites This workshop assumes you're familiar with building applications with Dart. To complete this workshop, make sure that your development environment meets the following requirements:
Replace main.dart
import 'package:flutter/material.dart';
void main() {
runApp(const GenerativeAISample());
}
class GenerativeAISample extends StatelessWidget {
const GenerativeAISample({
super.key,
});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter + Generative AI',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.deepPurple,
title: const Text(
'Guess the Emovie 👦🏻',
style: TextStyle(color: Colors.white),
),
),
body: SingleChildScrollView(
child: Column(
children: [
Image.asset(
"assets/images/movie.jpeg",
height: 200,
width: double.infinity,
fit: BoxFit.cover,
),
const Text(
"Hint - List of Emoji's",
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
],
),
),
));
}
}
pubspec.yaml add images
assets:
- assets/images/

Pull the code and switch to branch https://github.com/sumithpdd/emovji
Last updated