if you use Sqlite to create database:
Step 1: When you create database, you set a directory for it, you can use path_provider like this:
var dir = await getApplicationDocumentsDirectory();
_dbPath = dir.path + '/$dbName';
so now you know what directory and path it is.
Step 2: Then use flutter_archive plugin to zip the file (This will zip the file in a directory, which is your db);
Step 3: use flutter_email_sender to send it by email, like this:
final email = Email(
body: 'content',
subject: 'content',
recipients: ['email'],
cc: ['email'],
attachmentPaths: [exportPath],
isHTML: false,
);
await FlutterEmailSender.send(email);
Your need to provide exportPath, which is the zip file path you set up.
It worked for us, hope this will help other people!