![]() ![]() It’s built with flutter_redux and uses a REST API to support CRUD actions (create, replace, update and delete). I consider our app to be a relatively standard business app. We found there were two areas we needed to focus on: UI layout and keyboard support. That being said in general you can’t just `flutter run -d chrome` and expect your mobile app to be a great web app. Sharing code is great but not if it comes at the expense of the final product, Flutter Web is truly amazing but not the right fit for our use case. Update: In the end we decided to use Flutter for desktop and mobile and React for web. Sure… performance isn’t quite up to native, but being able to share nearly all of our code across mobile, web and desktop is too big an advantage to pass up. We were about six months into our big rewrite using Vue.js when we had a chance to try Flutter Web (at the time called Hummingbird) for the first time and were instantly convinced. We’re able to ship high quality apps for Windows, macOS, Linux, Android and iOS from a single codebase, SwiftUI would only cover two of those platforms.Īlthough we’re using Flutter to build the Invoice Ninja web app it wasn’t our original plan. From a business/costs perspective this puts it at a major disadvantage compared to cross platform solutions like Flutter. padding(.all) to add a standard amount of padding to all sides or the ability to use ContainerRelativeShape() to ensure the borders radius of nested elements match their parent container.Īlthough Swift is a great language and SwiftUI is an elegant framework they have one obvious critical flaw, they only support Apple’s platforms. privacySensitive() to the Text field.Īnother area I appreciated was that SwiftUI made it simple to design nice layouts without too much effort. For example, to ensure sensitive data isn’t visible when the phone is locked you can simply add. There’s noticeably less boilerplate code (as can be seen in this comparison site) and as one would expect there’s a much tighter integration between the software and hardware than with a cross platform solution. On the whole I really enjoyed developing with SwiftUI. Right click the app icon in the dock and select Options > Show in Finder.Click the widget to launch the Flutter app.I found the following steps would resolve the issue: In general Xcode worked well however one issue I ran into is that sometimes changes made to the code weren’t reflected when relaunching the widget. This makes the behavior more similar to Dart. One interesting trick I came across was to use extensions to make it possible to throw any string as an error. I’m sure I’ve made many rookie mistakes even with ChatGPT helping along the way. As mentioned above this was my first time coding in Swift so try not to judge me too harshly. The Swift code for the widget is available on GitHub. ![]() If you watch the video you may notice our widget design looks conspicuously similar to the design implemented in the video.įor the widget configuration although it’s covered in the Apple docs this article “ How to Create Configurable Widgets With Dynamic Options” on provides a much easier to follow guide walking through the implementation. To get up to speed with building the UI for widgets I found the WWDC videos to be extremely helpful, in particular Build SwiftUI views for widgets. I could feed it back the error and it would politely apologize and try again but I often got stuck in loops which ended in frustration. That said using ChatGPT wasn’t without its challenges, around half of the code it generated had errors. Refactoring my poorly written Swift code.Converting sample JSON to Swift data classes.Here are some use cases which worked particularly well: This was my first time coding in Swift, I found ChatGPT incredibly helpful in getting me up to speed. ![]() For our implementation we’re using the widget_kit_plugin package, but I recently came across the home_widget package which also supports Android. Instead, you can use a package to share data from the Flutter app to the widget and then implement the UI using Swift UI. It’d be great if it were possible to build the widget using just Flutter however sadly that isn’t the case. The main reason for building the widget was to add a useful feature to our app, however I was also interested in having a chance to try out Swift UI. YouTube | Build a Native iOS Widget App with Flutter & SwiftUI Motivation ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |