Reputation: 968
I use Compose version 1.0.0-beta06, I can't call Modifier.align()
method
build.gradle
// Compose
implementation 'androidx.compose.ui:ui:1.0.0-beta06'
implementation 'androidx.compose.ui:ui-tooling:1.0.0-beta06'
implementation 'androidx.compose.foundation:foundation:1.0.0-beta06'
implementation 'androidx.compose.material:material:1.0.0-beta06'
implementation 'androidx.compose.material:material-icons-core:1.0.0-beta06'
implementation 'androidx.compose.material:material-icons-extended:1.0.0-beta06'
implementation 'androidx.activity:activity-compose:1.3.0-alpha07'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04'
implementation 'androidx.compose.runtime:runtime-livedata:1.0.0-beta06'
implementation 'androidx.compose.runtime:runtime-rxjava2:1.0.0-beta06'
// Compose Accompanist
implementation 'com.google.accompanist:accompanist-coil:0.9.1'
implementation 'com.google.accompanist:accompanist-pager:0.9.1'
implementation 'com.google.accompanist:accompanist-pager-indicators:0.9.1'
implementation 'com.google.accompanist:accompanist-systemuicontroller:0.9.1'
// Compose other libs
implementation("androidx.compose.ui:ui-util:1.0.0-beta06")
Please help me. Thanks!
Upvotes: 2
Views: 4414
Reputation: 3689
The align()
method is part of the BoxScope
DSL. In order to use the method
, you should be inside a Box
, not inside a Row
as in your example.
Upvotes: 8