Pana-g / flutter_earth_globe

MIT License
19 stars 5 forks source link

Earth not appearing #8

Open Espade opened 3 months ago

Espade commented 3 months ago

Hello, this is cool package! When I add an EarthPage in my code, the earth is not appearing:

class EarthPage extends StatefulWidget {
  @override
  State<EarthPage> createState() => _EarthPage();
}

class _EarthPage extends State<EarthPage> {
  late FlutterEarthGlobeController _controller;

  @override
  initState() {
    super.initState();
    _controller = FlutterEarthGlobeController(
        rotationSpeed: 0.05,
        isBackgroundFollowingSphereRotation: true,
        background: Image.asset('assets/2k_stars.jpg').image,
        surface: Image.asset('assets/2k_earth-day.jpg').image);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Earth Globe Example'),
        ),
        body: SafeArea(
        child: FlutterEarthGlobe(
              controller: _controller,
              radius: 120,
            )
        ),
      ),
    );
  }
}
Pana-g commented 3 months ago

Thanks for the feedback @Espade . Can you provide a little bit more information? For example the device you are testing this code, the flutter version and flutter_earth_globe version.