import 'package:shared_preferences/shared_preferences.dart';

final class Agreement{
  bool agreed;

  Agreement({required this.agreed});
}

void saveAgreement(bool agreed) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.setBool('agreed_to_terms_and_conditions', agreed);
}

Future<Agreement> getAgreement() async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  return Agreement(agreed: prefs.getBool('agreed_to_terms_and_conditions') ?? false);
}
