Esri / arcgis-maps-sdk-flutter-samples

Sample code for ArcGIS Maps SDK for Flutter
Apache License 2.0
15 stars 5 forks source link

New sample: Snap Geometry Edits #157

Closed jenmerritt closed 2 months ago

jenmerritt commented 2 months ago

Adds the snap geometry edits sample.

One thought is that I've re-used the String extension. Are we happy with extensions in individual samples or do we want to start a util class when it's reused?

PaulAllanSturm commented 2 months ago

One thought is that I've re-used the String extension. Are we happy with extensions in individual samples or do we want to start a util class when it's reused?

Yes we should get to this, now or later. We already have SampleStateSupport as well.

I think we should do it as an internal package/library, so we have just one import statement, like

import 'package:arcgis_maps_sdk_flutter_samples/sample_support.dart';

(I don't like having a misc bucket called "utils".)

We should also have some policy about what we put in there. It should only be things that aren't central to the tutorial flow. Anything tied directly to the tutorial should be spelled out inline, even if that means a bit of duplication. But other stuff we could/should stash in the support package, things like the overlay !_ready widget and a generic showAlertDialog method. And maybe the "Settings" bottomSheet widget. Especially stuff that is bulky and crowds out the tutorial content.

The downside is that users can't do a complete cut-n-paste of the sample code and have it work out-of-the-box. But I think we have to accept that tradeoff, especially as we add more complexity to the sample app.

jenmerritt commented 2 months ago

Ready for re-review @PaulAllanSturm , thanks!