title: Some instance member can't be accessed using static access
body: <p>Earlier this week I followed some tutorial on Youtube for creating a flutter app, and I got some problems where it says that.</p>
  <blockquote>
  <p>Instance member 'textTheme' can't be accessed using static access.</p>
  </blockquote>
  <p>The problems occur at LandingPage.dart</p>
  <pre><code>@override 
  Widget build(BuildContext context) {
  final ThemeData themeData = Theme.of(context);
  return Container(
    margin: const EdgeInsets.symmetric(vertical: 20),
    child: Column(
      children: [
        Stack(
          children: [
            ClipRRect(
              borderRadius: BorderRadius.circular(25.0),
                child: Image.asset(itemData[&quot;image&quot;])),
            Positioned(
                top: 15,
                right: 15,
                child: BorderBox(
                  width: 50,
              height: 50,
              child: Icon(Icons.favorite_border,color: COLOR_BLACK,
              ),
            ))
          ],
        ),
        addVerticalSpace(15),
        Row(
          children: [
            Text(&quot;${formatCurrency(itemData[&quot;amount&quot;])}&quot;,
            style: themeData.textTheme.headline1)
          ],
        )
      ],
    )
  );}
  </code></pre>
  <p>textTheme.headline1 was imported from constants.dart.</p>
  <pre><code>import 'package:flutter/material.dart';
  const COLOR_BLACK = Color.fromRGBO(48, 47, 48, 1.0);
  const COLOR_GREY = Color.fromRGBO(141, 141, 141, 1.0);
  const COLOR_WHITE = Colors.white;
  const COLOR_DARK_BLUE = Color.fromRGBO(20, 25, 45, 1.0);
  const TextTheme TEXT_THEME_DEFAULT = TextTheme(
    headline1: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 26),
    headline2: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 22),
    headline3: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 20),
    headline4: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 16),
    headline5: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 14),
    headline6: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 12),
    bodyText1: TextStyle(
        color: COLOR_BLACK, fontWeight: FontWeight.w500, fontSize: 14, height: 1.5),
    bodyText2: TextStyle(
        color: COLOR_GREY,  fontWeight: FontWeight.w500, fontSize: 14, height: 1.5),
    subtitle1: TextStyle(
        color: COLOR_BLACK, fontSize: 12, fontWeight: FontWeight.w400),
    subtitle2: TextStyle(
        color: COLOR_GREY,  fontSize: 12, fontWeight: FontWeight.w400)
  );
  const TextTheme TEXT_THEME_SMALL = TextTheme(
  headline1: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 22),
  headline2: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 20),
  headline3: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 18),
  headline4: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 14),
  headline5: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 12),
  headline6: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w700, fontSize: 10),
  bodyText1: TextStyle(
      color: COLOR_BLACK, fontWeight: FontWeight.w500, fontSize: 12, height: 1.5),
  bodyText2: TextStyle(
      color: COLOR_GREY,  fontWeight: FontWeight.w500, fontSize: 12, height: 1.5),
  subtitle1: TextStyle(
      color: COLOR_BLACK, fontSize: 10, fontWeight: FontWeight.w400),
  subtitle2: TextStyle(
      color: COLOR_GREY,  fontSize: 10, fontWeight: FontWeight.w400)
  );
  </code></pre>
  <p>Thank You and have a good day:))</p>