What\'s the best programming practice to
create a constant class in Flutter
to keep all the application constants for easy referenc
For all constants, just create constants.dart file under lib folder or lib/util folder, then keep all constant variables as follows :
const SUCCESS_MESSAGE=" You will be contacted by us very soon.";
// Api related
const apiBaseURL = "https://baseurl.com";
const userLoginApi = "login";
const userSignupApi = "signup";
// Shared Preference keys
const kDeviceName = "device_name";
const kDeviceUDID = "device_id";
// Asset Constants
const navBarLogoImage = "assets/images/home_images/sample.png
then import constants.dart file in required class and use it directly.