easy_chat_game

Creator: coderz1093

Last updated:

0 purchases

easy_chat_game Image
easy_chat_game Images

Languages

Categories

Add to Cart

Description:

easy chat game

Easy Chat Game #





To implement a scripted chat game for fun
Features #

Support chat game for fun
Support light & dark modes

How to use #
There are two ways to use Easy Wallpaper.
1: Stand-Alone App mode #
void onLaunch() async {
final result = await Navigator.of(context).push(
MaterialPageRoute(
fullscreenDialog: true,
builder: (_) => EasyChatGameApp(
title: 'Teacher Chat',
levels: ChatData.allLevels(),
)),
);
if (result == false) onLaunch();
}
copied to clipboard
2: Add to Widget-Tree #
EasyPrankCallApp(
title: 'Scary Teacher Prank',
levels: ChatData.allLevels(),
placementBuilder: _addPlacements,
onTapEvent: _onTapEvent,
)
copied to clipboard
Additional Info #
Data Model #
Prepare model list and pass it to the EasyChatGameApp() widget.

class ChatData {
static List<ChatLevel> allLevels() {
return [
level1(),
level2(),
];
}

static ChatLevel level1() {
Map<String, List<String>> chatList = {};

chatList[ChatLevel.botKey] = ['where were you yesterday?'];
chatList['where were you yesterday?'] = [
'My dog was sick?(Lie)',
'Pirates kidnap me(Lie)'
];
chatList['My dog was sick?(Lie)'] = ['You have a dog?'];
chatList['Pirates kidnap me(Lie)'] = ['Pirates?! In Ohio?'];
chatList['You have a dog?'] = [
'No i just overslept(Truth)',
'Her name is Cindy(Lie)'
];
chatList['No i just overslept(Truth)'] = ['Okay enough you are expelled'];
chatList['Her name is Cindy(Lie)'] = ['I love dogs but call me next time'];
chatList['Pirates?! In Ohio?'] = [
'Yes they are very dangerous',
'Sounds weird.But it\'s true'
];
chatList['Yes they are very dangerous'] = ['But you are free now. Right?'];
chatList['Sounds weird.But it\'s true'] = ['But you are free now. Right?'];
chatList['But you are free now. Right?'] = [
'I escaped them',
'they let me go'
];
chatList['I escaped them'] = [
'i don\'t really believe you! Meet me in my office'
];
chatList['they let me go'] = ['Why?'];
chatList['Why?'] = ['They were Scared of me', 'I made them my friends'];
chatList['They were Scared of me'] = [
'i don\'t really believe you! Meet me in my office'
];
chatList['I made them my friends'] = ['uh, Okay'];
return ChatLevel(
levelName: 'Find excuse',
botName: 'Scary Teacher',
botImg: 'assets/kids/kid1.png',
userImg: 'assets/kids/kid1.png',
chatList: chatList,
successMessages: [
'I love dogs but call me next time',
'Oh it\'s okay. Sorry for bothering you',
'uh, Okay'
],
failureMessages: [
'Okay enough you are expelled',
'i don\'t really believe you! Meet me in my office'
],
);
}
}
copied to clipboard
See Example for better understanding.
Authors #
Noor Ali Butt

Hanzla Waheed

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.