-
๐ญ Iโm currently working on TakeIn, The Flutter Way
-
๐ฑ Iโm currently learning Flutter, SwiftUI
-
๐ฏ Iโm looking to collaborate with other content creators
-
โก Fun fact I love to play Badminton and Chai over coffee.
build-an-animated-app-with-rive-and-flutter's Introduction
build-an-animated-app-with-rive-and-flutter's People
Forkers
flutterworks mochammadguntur eugenevol mohd14shoeb devfirdavs black-coda faisal-kabir bedirhanssaglam ferdyfebriyanto creolben kriacoesmobile bd911-coder fexce mrshafqatnadeem fxztam krishnawithcoder zf0x00 pszione losajhonny wisdak-forks baronrustamov eis6aer codeagarwal lakakenny akotox sheikhsoft hashimgithub capps096github ska2519 vpsoft korosenaii lu-lucifer toure5013 jesussmile nahidnsu152 vijaychien buraro-technologies kaberere6 mohitkoley cavassin12 linox arbazshaikh077 skye10da utkuvrs corentindore devmaslove warmeaf sanjazz jerrywebman un33k gvpinto qq282126990 surafelmohammed mhmtgokmen arturobl00 linhdangquang sathyassn ahmadmbalan leandro096 devil0mak grifon333 manishmg3994 ngochiendev brandon-morision abaso007 soumendas03 manarmiru05 khusan1697 grandbudha ives-cream colin3dmax salmannaeem112215 mashiban wd308389182 icxcc tanggsen rodrigogalhardo delais kia1349 ismaelmazrooeinew pratyushkiran vannhat123 chandumunna thaiduc96 sowiner extrastufff054 chandan0000 atomdev8 ubaidxdev kinleyrabgay khairul989 nanatutu gurafwisandi mango2juice em-sabeel agdolla mohamedrashad99 archean alok19980 lijithkumar95build-an-animated-app-with-rive-and-flutter's Issues
Problem with Rive button
I tried to code simple rive button from your code and my button works strangely. If I add your riv button I have this same problem too. Can you try my code and will tell me what is wrong?
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'HOME PAGE',
theme: ThemeData(
textTheme: const TextTheme(
titleLarge: TextStyle(fontSize: 25.0, color: Colors.lightBlueAccent),
),
scaffoldBackgroundColor: const Color(0xFF011230),
),
home: const MyHomePage(title: 'HOME PAGE'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
late RiveAnimationController _controller;
@override
void initState() {
super.initState();
_controller = OneShotAnimation(
"active",
autoplay: false,
);
}
@override
void dispose() {
super.dispose();
_controller.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
elevation: 0,
centerTitle: true,
title: Text(
widget.title,
style: const TextStyle(
fontSize: 25,
color: Colors.lightBlueAccent,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic),
),
backgroundColor: Colors.transparent,
),
body: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Container(
padding: const EdgeInsets.only(
top: 60, right: 20, left: 20, bottom: 1),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Flex(direction: Axis.horizontal, children: [
Expanded(
child: GestureDetector(
onTap: () {
_controller.isActive = true;
Future.delayed(
const Duration(milliseconds: 750),
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const Test(),
),
);
},
);
},
child: SizedBox(
height: 64,
width: MediaQuery.of(context).size.width,
child: RiveAnimation.asset(
"assets/RiveAssets/buttonT.riv",
controllers: [_controller],
),
),
)),
]),
],
),
)));
}
}
class Test extends StatelessWidget {
const Test({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text(
"NEXT PAGE",
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
backgroundColor: const Color(0xFF011230),
elevation: 0,
),
body: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: ListView(
padding: const EdgeInsets.only(
top: 10, right: 20, left: 20, bottom: 5),
children: <Widget>[
Flex(
direction: Axis.horizontal,
children: [
Expanded(
child: ElevatedButton(
onPressed: () {},
child: const Text("test 1",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
)),
),
),
],
),
const SizedBox(height: 15),
Flex(
direction: Axis.horizontal,
children: [
Expanded(
child: ElevatedButton(
onPressed: () {},
child: const Text("test 2",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
)),
),
),
],
),
const SizedBox(height: 15),
Flex(
direction: Axis.horizontal,
children: [
Expanded(
child: ElevatedButton(
onPressed: () {},
child: const Text("test 3",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
)),
),
),
],
),
const SizedBox(height: 5),
],
)));
}
}
Rive animation button https://rive.app/community/4478-9135-test-button/
Navigation
It would be cool to see episode 6 with the implementation of Go_router ๐คฉ
there is only one ontap so i cant navigate to mulltiple pages if someone know how to do this whith one ontap please let me know
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.