我有一个Dockerfile如下所示:
# Install Operating system and dependencies
FROM ubuntu:22.04 AS build-env
RUN apt-get update
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3
RUN apt-get clean
RUN useradd -ms /bin/bash user
USER use
在Dart,中,我理解super是如何工作的:
class Foo {
Foo(int a, int b) {
//Code of constructor
}
}
class Bar extends Foo {
Bar(int a, int b) : super(a, b);
}
当super被使用在cubit(或blocs)类flutter_bloc中时,我真的不明白会发生什么。
例如,我不理解CounterCubit类何时扩展Cubit:CounterCubit extends Cubit<CounterState>和CounterState类作为cubi
我正在使用flutter_bloc & bloc包来管理状态。 在子页面中,我正在初始化bloc &而在返回父页面时,我释放了bloc对象。 当我立即返回父页面时,阻塞抛出错误Unhandled Exception: Bad state: Cannot add new events after calling close,因为在加载时,在子页面上,我正在阻塞中调用api。api完成后的触发状态。此时已经阻止了对象的释放。 [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Bad state: C