cobe_flutter 1.0.1
cobe_flutter: ^1.0.1 copied to clipboard
A Flutter package that recreates the COBE globe with markers, arcs, and overlay projections.
cobe_flutter #
A Flutter package that recreates the COBE globe with dotted land masses, markers, arcs, and overlay projections.

Visual inspiration and interaction reference: COBE IP demo.
Features #
CobeGlobe: the interactive globe widgetCobeController: state updates viaupdate(...)andreplace(...)CobeOptions: rendering configurationCobeMarkerandCobeArc: globe entities- image and GeoJSON-based map sampling
Installation #
dependencies:
cobe_flutter: ^0.1.0
Usage #
import 'package:cobe_flutter/cobe_flutter.dart';
import 'package:flutter/material.dart';
class GlobeDemo extends StatefulWidget {
const GlobeDemo({super.key});
@override
State<GlobeDemo> createState() => _GlobeDemoState();
}
class _GlobeDemoState extends State<GlobeDemo> {
late final CobeController controller = CobeController(
const CobeOptions(
width: 640,
height: 640,
phi: 0,
theta: 0.25,
dark: 0,
diffuse: 1.2,
mapSamples: 9000,
mapBrightness: 6,
baseColor: Color(0xFFEAF1FF),
markerColor: Color(0xFF2C6BFF),
glowColor: Color(0xFF8CB6FF),
arcColor: Color(0xFF446BFF),
markers: <CobeMarker>[
CobeMarker(
id: 'lagos',
location: CobeLocation(6.5244, 3.3792),
size: 0.06,
),
],
),
);
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return CobeGlobe(
controller: controller,
autoRotate: true,
autoRotateSpeed: 0.18,
draggable: true,
);
}
}
Demo #
There is a fuller showcase app in demo/ covering markers, arcs,
overlays, and alternate map samplers.