jonataslaw / get_server

A backend server that makes it possible to program with Flutter syntax and reuse existing code
Apache License 2.0
477 stars 42 forks source link

When running getserver, the server can't connect to mongodb? #53

Closed rambozzang closed 3 years ago

rambozzang commented 3 years ago

When running getserver, the server can't connect to mongodb?

use mongo_dart: ^0.7.0+2

error: Error: Not found: 'dart:ui'

lib/main.dart: Warning: Interpreting this as package URI, 'package:mon_server/main.dart'. ../../flutter/packages/flutter/lib/src/foundation/basic_types.dart:9:1: Error: Not found: 'dart:ui' export 'dart:ui' show VoidCallback; ^ ../../flutter/packages/flutter/lib/src/foundation/binding.dart:8:8: Error: Not found: 'dart:ui' import 'dart:ui' as ui show SingletonFlutterWindow, Brightness, PlatformDispatcher, window; ^ ../../flutter/packages/flutter/lib/src/foundation/debug.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' as ui show Brightness; ^ ../../flutter/packages/flutter/lib/src/foundation/key.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show hashValues; ^ ../../flutter/packages/flutter/lib/src/foundation/stack_frame.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show hashValues; ^ ../../flutter/packages/flutter/lib/src/foundation/binding.dart:100:3: Error: Type 'ui.SingletonFlutterWindow' not found. ui.SingletonFlutterWindow get window => ui.window; ^^^^^^^^^^^^^^^^^^^^^^^^^ ../../flutter/packages/flutter/lib/src/foundation/binding.dart:121:3: Error: Type 'ui.PlatformDispatcher' not found. ui.PlatformDispatcher get platformDispatcher => ui.PlatformDispatcher.instance; ^^^^^^^^^^^^^^^^^^^^^ ../../flutter/packages/flutter/lib/src/foundation/change_notifier.dart:68:20: Error: Type 'VoidCallback' not found. void addListener(VoidCallback listener); ^^^^^^^^^^^^ ../../flutter/packages/flutter/lib/src/foundation/change_notifier.dart:72:23: Error: Type 'VoidCallback' not found. void removeListener(VoidCallback listener); ^^^^^^^^^^^^ ../../flutter/packages/flutter/lib/src/foundation/change_notifier.dart:106:8: Error: Type 'VoidCallback' not found. List<VoidCallback?> _listeners = List<VoidCallback?>.filled(0, null); ^^^^^^^^^^^^

jonataslaw commented 3 years ago

Remove these lines from your pubspec

  flutter:
    sdk: flutter
rambozzang commented 3 years ago

thank you