Giter Site home page Giter Site logo

custom_info_window's People

Contributors

abhishekduhoon avatar custardcream98 avatar mfaulk13 avatar usmanokara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom_info_window's Issues

Widget disappears when touching left or top of screen

Hello!

As the title states, when moving camera to bring widget offscreen from top or left, it disappears and the leftmost/topmost part of the widget touches edge of screen.

This does not occur for bottom and right side of screen

P.S. Thanks for turning this into a package, save a lot of time from having to make a custom info window

Unhandled Exception: NoSuchMethodError: The method 'call' was called on null

The code is almost identical as in the docs:

void showInfoWindow(LatLng latLng) {
    return _customInfoWindowController.addInfoWindow(
      Column(
        children: [
          Expanded(
            child: Container(
              decoration: BoxDecoration(
                color: Colors.blue,
                borderRadius: BorderRadius.circular(4),
              ),
              child: Padding(
                padding: const EdgeInsets.all(8.0),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Icon(
                      Icons.account_circle,
                      color: Colors.white,
                      size: 30,
                    ),
                    SizedBox(
                      width: 8.0,
                    ),
                    Text(
                      "I am here",
                      style: Theme.of(context).textTheme.headline6.copyWith(
                            color: Colors.white,
                          ),
                    )
                  ],
                ),
              ),
              width: double.infinity,
              height: double.infinity,
            ),
          ),
          Triangle.isosceles(
            edge: Edge.BOTTOM,
            child: Container(
              color: Colors.blue,
              width: 20.0,
              height: 10.0,
            ),
          ),
        ],
      ),
      latLng,
    );
  }

And the error is here:

V/Configuration(23879):  needToUpdateOverlays
E/flutter (23879): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
E/flutter (23879): Receiver: null
E/flutter (23879): Tried calling: call(Instance of 'Column', Instance of 'LatLng')
E/flutter (23879): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
E/flutter (23879): #1      _MapScreenState.showInfoWindow (package:flutter_firebase_chat_app/screens/map/map_screen.dart:165:53)
E/flutter (23879): #2      _MapScreenState.createMarkers.<anonymous closure> (package:flutter_firebase_chat_app/screens/map/map_screen.dart:50:20)
E/flutter (23879): #3      _GoogleMapState.onMarkerTap (package:google_maps_flutter/src/google_map.dart:344:31)
E/flutter (23879): #4      GoogleMapController._connectStreams.<anonymous closure> (package:google_maps_flutter/src/controller.dart:73:55)
E/flutter (23879): #5      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (23879): #6      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (23879): #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (23879): #8      CastStreamSubscription._onData (dart:_internal/async_cast.dart:85:11)
E/flutter (23879): #9      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (23879): #10     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (23879): #11     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (23879): #12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (23879): #13     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (23879): #14     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
E/flutter (23879): #15     _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)
E/flutter (23879): #16     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
E/flutter (23879): #17     _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (23879): #18     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (23879): #19     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (23879): #20     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (23879): #21     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (23879): #22     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
E/flutter (23879): #23     _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)
E/flutter (23879): #24     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
E/flutter (23879): #25     _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (23879): #26     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (23879): #27     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (23879): #28     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (23879): #29     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter (23879): #30     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter (23879): #31     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter (23879): #32     _rootRun (dart:async/zone.dart:1346:47)
E/flutter (23879): #33     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (23879): #34     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (23879): #35     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (23879): #36     _rootRun (dart:async/zone.dart:1354:13)
E/flutter (23879): #37     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (23879): #38     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (23879): #39     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (23879): #40     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (23879): #41     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter (23879): 
V/Configuration(23879):  needToUpdateOverlays

No implementation found for method map#getScreenCoordinate on channel plugins.flutter.dev/google_maps_android_0

i get this exception when trying to open window
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method map#getScreenCoordinate on channel plugins.flutter.dev/google_maps_android_0)
E/flutter ( 6410): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:320:7)
E/flutter ( 6410):
E/flutter ( 6410): #1 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:522:43)
E/flutter ( 6410):
E/flutter ( 6410): #2 GoogleMapsFlutterAndroid.getScreenCoordinate (package:google_maps_flutter_android/src/google_maps_flutter_android.dart:427:37)
E/flutter ( 6410):
E/flutter ( 6410): #3 _CustomInfoWindowState._updateInfoWindow (package:custom_info_window/custom_info_window.dart:84:41)
E/flutter ( 6410):
E/flutter ( 6410):

Info window pops up on camera move

Hi, thank you for the package, but I have one issue - info window constantly pops up on camera move, despite being hidden by onTap() before. It seems to me that it's abnormal behaviour, do you have any thoughts on how to fix that?

i cant upgrade google_maps flutter

hi, thank you for the practical package.
i want to update a new version of google_maps_flutter version 2 (2.0.2)but get this error :
Because custom_info_window 0.0.4 depends on google_maps_flutter ^1.1.1 and no versions of custom_info_window match >0.0.4 <0.1.0, custom_info_window ^0.0.4 requires google_maps_flutter ^1.1.1.
So, because irantracking(my app name) depends on both google_maps_flutter ^2.0.2 and custom_info_window ^0.0.4, version solving failed.
pub get failed (1; So, because irantracking(my app name) depends on both google_maps_flutter ^2.0.2 and custom_info_window ^0.0.4, version solving failed.)

Just a question: What if the point is not centered on the screen?

I see from your code that you calculate the top/left margins based on the assumption the point of interest is center on the screen. Am I reading the code correctly? If so, how you handle the case the point maybe near the left, right, top or bottom of the screen where the info windows may need to partially display on the screen. How is the top/left margins should be? Thank you in advance for the help!

Web support

Great package. Can you add web support? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.