Position widgets in a 3D scene

Overview

Flutter Stage

pub package

A widget that positions its children in a 3D scene.

Getting Started

Add flutter_stage as a dependency in your pubspec.yaml file.

dependencies:
  flutter_stage: ^0.0.1

Import package.

import 'package:flutter_stage/flutter_stage.dart';
... ...
  
class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Stage(
        onSceneCreated: (Scene scene) {
          scene.camera.position.setFrom(Vector3(0, 0, 1000));
          scene.camera.updateTransform();
        },
        children: [
          Actor(
            position: Vector3(0, 0, 0),
            rotation: Vector3(0, 30, 0),
            children: [
              Actor(position: Vector3(0, 0, 300), rotation: Vector3(0, 0, 0), width: 600, height: 600, widget: Container(color: Colors.red.withOpacity(0.5))),
              Actor(position: Vector3(300, 0, 0), rotation: Vector3(0, 90, 0), width: 600, height: 600, widget: Container(color: Colors.green.withOpacity(0.5))),
              Actor(position: Vector3(0, 0, -300), rotation: Vector3(0, 180, 0), width: 600, height: 600, widget: Container(color: Colors.blue.withOpacity(0.5))),
              Actor(position: Vector3(-300, 0, 0), rotation: Vector3(0, 270, 0), width: 600, height: 600, widget: Container(color: Colors.yellow.withOpacity(0.5))),
              Actor(position: Vector3(0, -300, 0), rotation: Vector3(90, 0, 0), width: 600, height: 600, widget: Container(color: Colors.pink.withOpacity(0.5))),
              Actor(position: Vector3(0, 300, 0), rotation: Vector3(270, 0, 0), width: 600, height: 600, widget: Container(color: Colors.white.withOpacity(0.5)))
            ],
          ),
        ],
      ),
    );
  }

Screenshot

screenshot

Flutter Clock Challenge submission

You might also like...

A Flutter package for inspecting widgets.

A Flutter package for inspecting widgets.

inspector A Flutter package for inspecting widgets. Also comes with an eyedropper functionality. Useful for debugging widgets and for QA testing. Supp

Sep 23, 2022

Set of Flutter widgets built using physics based animations.

Elastic Widgets Set of Flutter widgets built using physics based animations. Widgets Seek Bar Range Picker Installation Add this to your package's pub

Dec 4, 2021

This repo is for anything that can be reusable in flutter like custom widgets πŸŸ₯, animations 🌟and more

Ease This packa is for anything that can be reusable in flutter like custom widgets πŸŸ₯ , animations 🌟 and more. Features 1-custom text widget to ease

Dec 3, 2022

A recipe app, in which you will learn about different Scrollable widgets.

A recipe app, in which you will learn about different Scrollable widgets.

Scrollable-Widgets : A recipe app, in which you will learn about different Scrollable widgets. Concepts Included : ListView & Nested ListView GridView

Apr 26, 2022

Purpose of this project is to create extendable architecture of making platform aware Widgets which automatically select platform specific implementation

Old good factory Main obstacle in creating native experience on Flutter is the fact that you are asked to rebuild two layouts using platform specific

Oct 14, 2022

A library for widgets that load their content one page (or batch) at a time.

A library for widgets that load their content one page (or batch) at a time.

A library for widgets that load their content one page (or batch) at a time (also known as lazy-loading and pagination). Features Load data one page a

Oct 20, 2022

Access app version and git informations from auto-generated and configurable widgets

This is a proof of concept and WIP Feedback and ideas welcome !! Access your pubspec and git commit informations like versions and commit status from

Jul 7, 2021

This is a tutorial for all widgets in the flutter. It contain code, articles.

This is a tutorial for all widgets in the flutter. It contain code, articles.

Flutter Widgets ❀️ Star ❀️ the repo to support the project or πŸ˜„ Follow Me.Thanks! Facebook Page Twitter QQ Group Developer Flutter Open NieBin 963828

Dec 3, 2022

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)

flutter_html A Flutter widget for rendering HTML and CSS as Flutter widgets. Screenshot 1 Screenshot 2 Screenshot 3 Table of Contents: Installing Curr

Jan 5, 2023
Comments
  • Feature: add spheres actors

    Feature: add spheres actors

    First congratulation on this amazing and fun package, second wouldn't it be possible to create an actor that has a geometry of a sphere? I think the most hard part would be how to work with it when using the transformed matrix (like rotating the stage) but my guess that it is possible

    opened by youssefali424 1
Owner
Zebiao Hu
Just a coder! Languages: Flutter, Dart, Go, Delphi.
Zebiao Hu
Align And Position Widgets For Flutter

Align & Position Widgets - Flutter We will learn more about how to align & posit

Behruz Hurramov 1 Dec 27, 2021
This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

screen_retriever This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc. screen_retriever P

LeanFlutter 27 Dec 6, 2022
A widget based on Flutter's new Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released.

pinch_zoom A widget based on Flutter's new Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released

Teun Kortekaas 36 Dec 30, 2022
Position calculation and beacons scanning, using Dart language with Flutter Framework.

BeaconLocation A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

Dimitris Motsios 0 Dec 29, 2021
Target the specific design of Material for Android and Cupertino for iOS widgets through a common set of Platform aware widgets

Flutter Platform Widgets This project is an attempt to see if it is possible to create widgets that are platform aware. Currently in order to render t

null 1.3k Jan 4, 2023
Target the specific design of Material for Android and Cupertino for iOS widgets through a common set of Platform aware widgets

Flutter Platform Widgets This project is an attempt to see if it is possible to create widgets that are platform aware. Currently in order to render t

null 1.3k Jan 4, 2023
ABC of Flutter widgets. Intended for super beginners at Flutter. Play with 35+ examples in DartPad directly and get familiar with various basic widgets in Flutter

Basic Widgets Examples This is aimed for complete beginners in Flutter, to get them acquainted with the various basic widgets in Flutter. Run this pro

Pooja Bhaumik 815 Jan 3, 2023
Arisprovider - A mixture between dependency injection (DI) and state management, built with widgets for widgets

A mixture between dependency injection (DI) and state management, built with wid

Behruz Hurramov 1 Jan 9, 2022
Widgets intermediate - Intermediate Widgets For Flutter

Intermediate Widgets 4-MODUL 5-LESSON Alert Dialog (Android & IOS) Drawer Single

Tukhtamurodov Sardorbek 2 Feb 6, 2022
Implements GTK Widgets, themes and titlebar buttons in Flutter. Based on the GNOME HIG

GTK ❀️ Flutter Unofficial implementation of GTK Widgets, themes and titlebar buttons in Flutter. Based on the GNOME Human Interface Guidelines. Featur

Prateek SU 164 Dec 26, 2022