@@ -28,9 +28,7 @@ import com.ptrbrynt.kotlin_bloc.sample.ui.blocs.CounterBloc
28
28
import com.ptrbrynt.kotlin_bloc.sample.ui.blocs.CounterEvent
29
29
import com.ptrbrynt.kotlin_bloc.sample.ui.cubits.CounterCubit
30
30
import com.ptrbrynt.kotlin_bloc.sample.ui.theme.KotlinBlocTheme
31
- import kotlinx.coroutines.FlowPreview
32
31
33
- @FlowPreview
34
32
class MainActivity : ComponentActivity () {
35
33
override fun onCreate (savedInstanceState : Bundle ? ) {
36
34
super .onCreate(savedInstanceState)
@@ -46,7 +44,7 @@ class MainActivity : ComponentActivity() {
46
44
* Creates a Counter based on [CounterBloc]
47
45
*/
48
46
@Composable
49
- @FlowPreview
47
+
50
48
fun BlocCounter () {
51
49
val bloc = remember { CounterBloc () }
52
50
CounterBase (
@@ -61,7 +59,7 @@ fun BlocCounter() {
61
59
* Creates a Counter based on [CounterCubit]
62
60
*/
63
61
@Composable
64
- @FlowPreview
62
+
65
63
fun CubitCounter () {
66
64
val cubit = remember { CounterCubit () }
67
65
CounterBase (
@@ -70,7 +68,6 @@ fun CubitCounter() {
70
68
)
71
69
}
72
70
73
- @FlowPreview
74
71
@Composable
75
72
fun CounterBase (
76
73
bloc : BlocBase <Int >,
@@ -104,7 +101,7 @@ fun CounterBase(
104
101
/* *
105
102
* Creates a Counter based on [CounterBloc], using [BlocSelector] to transform each state into a String to display.
106
103
*/
107
- @FlowPreview
104
+
108
105
@Composable
109
106
fun BlocSelectorCounter (
110
107
scaffoldState : ScaffoldState = rememberScaffoldState(),
@@ -142,7 +139,7 @@ fun BlocSelectorCounter(
142
139
143
140
@Preview(" BlocCounter" )
144
141
@Composable
145
- @FlowPreview
142
+
146
143
fun BlocCounterPreview () {
147
144
KotlinBlocTheme {
148
145
BlocCounter ()
@@ -151,7 +148,7 @@ fun BlocCounterPreview() {
151
148
152
149
@Preview(" CubitCounter" )
153
150
@Composable
154
- @FlowPreview
151
+
155
152
fun CubitCounterPreview () {
156
153
KotlinBlocTheme {
157
154
CubitCounter ()
@@ -160,7 +157,7 @@ fun CubitCounterPreview() {
160
157
161
158
@Preview(" BlocSelectorCounter" )
162
159
@Composable
163
- @FlowPreview
160
+
164
161
fun BlocSelectorCounterPreview () {
165
162
KotlinBlocTheme {
166
163
BlocSelectorCounter ()
0 commit comments