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
import 'dart:math'; | |
import 'package:flare_dart/math/mat2d.dart'; | |
import 'package:flare_flutter/flare.dart'; | |
import 'package:flare_flutter/flare_actor.dart'; | |
import 'package:flare_flutter/flare_controller.dart'; | |
class DayNightControls extends FlareController { | |
FlutterActorArtboard _artboard; | |
String _animationName; |
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
FlareActor( | |
// pubspec asset | |
"assets/file.flr", | |
// Animation name as it appears in the Rive Editor | |
animation: "idle" | |
) |
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
import "package:flare_flutter/flare_actor.dart"; | |
import "package:flutter/material.dart"; | |
void main() => runApp(MaterialApp( | |
home: Scaffold( | |
backgroundColor: Colors.orangeAccent, | |
body: Center(child: PlayButton())))); | |
class PlayButton extends StatefulWidget { | |
const PlayButton({ |
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
// **** lib.mjs **** // | |
import mul from "./script.js"; | |
export function add(x, y) | |
{ | |
console.log("I Also try to multiply every once in a while!", mul(x,y)); | |
return x + y; | |
} |