-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
230 additions
and
135 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions
1
editing/assets/images/artificial-intelligence-flatline-ab453.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
import 'package:rive/rive.dart'; | ||
|
||
import '../widgets/activity.dart'; | ||
import '../widgets/task.dart'; | ||
|
||
class WelcomePage extends StatefulWidget { | ||
WelcomePage({super.key}); | ||
|
||
@override | ||
State<WelcomePage> createState() => _WelcomePageState(); | ||
} | ||
|
||
class _WelcomePageState extends State<WelcomePage> { | ||
SMITrigger? _trigger; | ||
|
||
void _hitBite() => _trigger?.fire(); | ||
|
||
late StateMachineController _controller; | ||
|
||
void _onRiveInit(Artboard artboard) { | ||
var ctrl = StateMachineController.fromArtboard(artboard, 'State Machine 1') | ||
as StateMachineController; | ||
ctrl.isActive = true; | ||
artboard.addController(ctrl); | ||
_trigger = ctrl.findInput<bool>('bite') as SMITrigger; | ||
setState(() { | ||
_controller = ctrl; | ||
}); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: EdgeInsets.all(8.0), | ||
child: Column( | ||
children: [ | ||
Text( | ||
"Welcome, my lord! Today is 25th, May. You have 2 pending tasks to complete.", | ||
style: TextStyle(fontSize: 16), | ||
), | ||
SizedBox( | ||
height: 200, | ||
width: 400, | ||
child: GestureDetector( | ||
child: RiveAnimation.asset( | ||
'assets/hippo.riv', | ||
fit: BoxFit.cover, | ||
onInit: _onRiveInit, | ||
), | ||
onTap: _hitBite, | ||
), | ||
), | ||
TextField( | ||
decoration: const InputDecoration( | ||
hintText: "Ask me anything", | ||
suffixIcon: Icon( | ||
Icons.send_outlined, | ||
color: Colors.indigo, | ||
), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.