title: How can I share info among @Composable function in Android Studio?
body: <p>In order to reduce complex, I need to split a big  <code>@Composable</code> function to small parts, and I need to share info such as variables among them.</p>
  <p>At present, I use Code A to do it by using top variables, I don't think it's a good.</p>
  <p>How can I share info among @Composable function in Android Studio?</p>
  <p><strong>Code A</strong></p>
  <pre><code>private var paddingXAxis = 80f
  private var paddingXLabelMargin = 8f
  private var paddingYAxis =50f
  private var xAxisLength = 100f
  private var yAxisLength = 100f
  private var maxPointCount = 40
  
  
  @Composable
  fun ScreenHome_Table(
      modifier: Modifier = Modifier,   
      mViewMode: SoundViewModel
  ) {
      Box( ) {
      
          Canvas(
              modifier = Modifier
                  .fillMaxSize()
                  .padding(10.dp)
          ) {
              setParameterTable(this, mContext)
              setProcess(this, uiMSoundDensity.soundList.toList())
              setMainAxis(this)  
              setChildXAxis(this, xTime)
              setChildYAxis(this)
          }
      }
  }
  
  
  fun setParameterTable(drawScope: DrawScope, mContext: Context) {
      with(drawScope) {
          xAxisLength = size.width - paddingXAxis * 2
          yAxisLength = size.height - paddingYAxis * 2
      }
      maxPointCount = mContext.resources.getInteger(R.integer.maxCount)
      divisionUnit = mContext.getString(R.string.divisionUnit)
       ...
  }
  
  
  fun setMainAxis(drawScope: DrawScope) {
      ...
  }
  </code></pre>