Mellotippet Status Update #2 - Firebase function and dev environment improvements

19 Nov 2023


This was my plan for the week:

What I actually did this week

Again, I achieved a bit less than planned. What I ended up doing was:

I had to spend most of the week working on my development environment and the force upgrade blog post. I learnt a ton about ruby, chruby, openssl, jekyll, liquid, scss, css and more. What probably took the most time was figuring out how to create beautiful code blocks, like this:

import 'package:firebase_remote_config/firebase_remote_config.dart';

class MyFirebaseRemoteConfig {
    final remoteConfig = FirebaseRemoteConfig.instance;

    static Future<void> initialize() async {
    final remoteConfig = FirebaseRemoteConfig.instance;
    await remoteConfig.setConfigSettings(
        RemoteConfigSettings(
        fetchTimeout: const Duration(minutes: 1),
        minimumFetchInterval: const Duration(hours: 1),
        ),
    );

    // These will be used before the values are fetched from Firebase Remote Config.
    await remoteConfig.setDefaults(const {
        'requiredMinimumVersion': '4.0.0',
        'recommendedMinimumVersion': '4.0.0',
    });

    // Fetch the values from Firebase Remote Config
    await remoteConfig.fetchAndActivate();

    // Optional: listen for and activate changes to the Firebase Remote Config values
    remoteConfig.onConfigUpdated.listen((event) async {
        await remoteConfig.activate();
    });
    }

    // Helper methods to simplify using the values in other parts of the code
    String getRequiredMinimumVersion() =>
    remoteConfig.getString('requiredMinimumVersion');

    String getRecommendedMinimumVersion() =>
    remoteConfig.getString('recommendedMinimumVersion');
}

Here is a first draft of the design :)

mellotippet design first draft

My plan for next week: