flutter_globe_3d 0.1.4 copy "flutter_globe_3d: ^0.1.4" to clipboard
flutter_globe_3d: ^0.1.4 copied to clipboard

A 3D Globe.

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_globe_3d/flutter_globe_3d.dart';

class MyGlobeApp extends StatefulWidget {
  const MyGlobeApp({super.key});

  @override
  State<MyGlobeApp> createState() => _MyGlobeAppState();
}

class _MyGlobeAppState extends State<MyGlobeApp> {
  late EarthController _controller;

  @override
  void initState() {
    super.initState();
    _controller = EarthController();
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        children: [
          Container(height: 100),
          Container(
            decoration: BoxDecoration(color: Colors.black),
            child: Row(
              children: [
                Flutter3DGlobe(
                  controller: _controller,
                  texture: AssetImage('assets/example.jpg'),
                  radius: 150,
                ),
                Column(
                  children: [
                    Text(
                      "example",
                      style: TextStyle(
                        color: Colors.white,
                        fontSize: 30,
                        fontWeight: FontWeight.w800,
                      ),
                    ),
                  ],
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
5
likes
130
points
607
downloads

Publisher

unverified uploader

Weekly Downloads

A 3D Globe.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, vector_math

More

Packages that depend on flutter_globe_3d