abhishekduhoon / custom_info_window Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
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
CustomInfoWindow(
controller: _customInfoWindowController,
height: 55, // dynamic
width: 160, // dynamic
offset: 50,
),
How to implement change the height and width of CustomInfoWindow according to the content?
I will really like to use this package for web, could that be implemented ??
How can I test this custom_info_window? Is there any example available which implements testing ?
When trying to show an InfoWindow I get the following error:
Unhandled Exception: NoSuchMethodError: The method 'call' was called on null
, It is highlighted that the update of the Map controller is done
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
For my project I need to align custom info window to right, is it possible?
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):
when maps open, info_window always open without Tap other screen like position and other, how about you with this problem in flutter?
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?
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.)
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!
Great package. Can you add web support? Thanks.
Is there a way to add multiple infoWindows?
Awesome package btw!
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.