Field '_areas' should be initialized because its type 'List<Area>' doesn't allow null

Flutter shows error Non-nullable instance field ‘_areas’ must be initialized. Maybe this is because of not defining null in lists areas what when defining null Like List? _areas; it shows an error on the index Error: Field ‘_areas’ should be initialized because its type ‘List’ doesn’t allow null. Error Line: List _areas; Here is my… Read More Field '_areas' should be initialized because its type 'List<Area>' doesn't allow null

Recreate colormap based on colorscale in matplotlib

I have an image of a color scale I filter out the actual color scale by using import cv2 import numpy as np colorbar = cv2.imread(‘colorbar-scheme-elevation.png’, cv2.IMREAD_UNCHANGED) colorbar = cv2.cvtColor(colorbar, cv2.COLOR_BGRA2BGR) hsv = cv2.cvtColor(colorbar, cv2.COLOR_RGB2HSV) lower_gray = np.array([0, 0, 0]) upper_gray = np.array([255, 10, 255]) mask = cv2.inRange(hsv, lower_gray, upper_gray) mask = cv2.bitwise_not(mask) res =… Read More Recreate colormap based on colorscale in matplotlib

BottomSheetScaffold is overriding the background color of its parent

I’m trying out BottomSheetScaffold and I just found a strange behavior (maybe a bug) when using it. I put it inside a Box { } that has a cyan background color: composable(route = "my_route") { Box( modifier = Modifier .fillMaxSize() .background(color = Color.Cyan), ) { val coroutineScope = rememberCoroutineScope() val bottomSheetScaffoldState = rememberBottomSheetScaffoldState() BottomSheetScaffold( scaffoldState… Read More BottomSheetScaffold is overriding the background color of its parent

Unable to retrieve multiple values from database

The following data exists in the database: [ { "_id": { "$oid": "628c787de53612aad30021ab" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030000", "open": "1.12161", "high": "1.12209", "low": "1.12161", "close": "1.12209", "vol": "561", "id": 1 }, { "_id": { "$oid": "628c787de53612aad30021ac" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030100", "open": "1.12206", "high": "1.1225", "low": "1.12206", "close": "1.1225", "vol": "1223",… Read More Unable to retrieve multiple values from database