import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/src/stores/settings/settings_store.dart';
import 'package:provider/provider.dart';

class SettingsHeaderListRow extends StatelessWidget {
  SettingsHeaderListRow({this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    final settingsStore = Provider.of<SettingsStore>(context);

    return Column(
      children: <Widget>[
        SizedBox(
          height: 20.0,
        ),
        Container(
          padding: EdgeInsets.only(left: 20.0),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[
              Observer(
                  builder: (_) => Text(
                        title.isNotEmpty
                        ? settingsStore.itemHeaders[title]
                        : '',
                        style: TextStyle(
                            fontSize: 15.0,
                            color: Theme.of(context).primaryTextTheme.caption.color),
                      ))
            ],
          ),
        ),
        SizedBox(
          height: 14.0,
        ),
      ],
    );
  }
}
